diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index a0136f66010e141f0707f26d4be9500397aa4579..61130a13622f750231d80907c1eb8c8d58246b53 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -163,7 +163,23 @@ class installer_dist extends installer_base {
if(!is_group($cf['vmail_groupname'])) caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
$command = 'useradd -g '.$cf['vmail_groupname'].' -u '.$cf['vmail_userid'].' '.$cf['vmail_username'].' -d '.$cf['vmail_mailbox_base'].' -m';
- if(!is_user($cf['vmail_username'])) caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
+ 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_array = ini_to_array(stripslashes($server_ini_rec['config']));
+ unset($server_ini_rec);
+
+ //* If there are RBL's defined, format the list and add them to smtp_recipient_restrictions to prevent removeal after an update
+ $rbl_list = '';
+ if (@isset($server_ini_array['mail']['realtime_blackhole_list']) && $server_ini_array['mail']['realtime_blackhole_list'] != '') {
+ $rbl_hosts = explode(",",str_replace(" ", "", $server_ini_array['mail']['realtime_blackhole_list']));
+ foreach ($rbl_hosts as $key => $value) {
+ $rbl_list .= ", reject_rbl_client ". $value;
+ }
+ }
+ unset($rbl_hosts);
+ unset($server_ini_array);
//* These postconf commands will be executed on installation and update
$postconf_placeholders = array('{config_dir}' => $config_dir,
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index 57b2cd6d6f37739d33d4c0c41220c157a7815614..7a2fa264db4f012f01eed84255c3f13140b13089 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -178,6 +178,22 @@ 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_array = ini_to_array(stripslashes($server_ini_rec['config']));
+ unset($server_ini_rec);
+
+ //* If there are RBL's defined, format the list and add them to smtp_recipient_restrictions to prevent removeal after an update
+ $rbl_list = '';
+ if (@isset($server_ini_array['mail']['realtime_blackhole_list']) && $server_ini_array['mail']['realtime_blackhole_list'] != '') {
+ $rbl_hosts = explode(",",str_replace(" ", "", $server_ini_array['mail']['realtime_blackhole_list']));
+ foreach ($rbl_hosts as $key => $value) {
+ $rbl_list .= ", reject_rbl_client ". $value;
+ }
+ }
+ unset($rbl_hosts);
+ unset($server_ini_array);
+
//* These postconf commands will be executed on installation and update
$postconf_placeholders = array('{config_dir}' => $config_dir,
'{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
diff --git a/install/install.php b/install/install.php
index 96c164ca24107a2d2830a20557a94c28c7f48401..c6b85a3bebdde2886c0f42e8aa4456067a535a98 100644
--- a/install/install.php
+++ b/install/install.php
@@ -571,7 +571,8 @@ if($install_mode == 'standard') {
}*/
//** Configure ISPConfig :-)
- if(strtolower($inst->simple_query('Install ISPConfig Web Interface',array('y','n'),'y')) == 'y') {
+ $install_ispconfig_interface_default = ($conf['mysql']['master_slave_setup'] == 'y')?'n':'y';
+ if(strtolower($inst->simple_query('Install ISPConfig Web Interface',array('y','n'),$install_ispconfig_interface_default)) == 'y') {
swriteln('Installing ISPConfig');
//** We want to check if the server is a module or cgi based php enabled server
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 2c975584eac30f8d68674d3508d356d276787c59..1e8459e2a5a2fcddcd21cabc0e2323f29662ee01 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -400,7 +400,7 @@ class installer_base {
$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'].".`sys_datalog` TO '".$value['user']."'@'".$host."' ";
+ $query = "GRANT SELECT, UPDATE(`status`, `error`) ON ".$value['db'].".`sys_datalog` TO '".$value['user']."'@'".$host."' ";
if ($verbose){
echo $query ."\n";
}
@@ -2094,8 +2094,8 @@ class installer_base {
}
$root_cron_jobs = array(
- "* * * * * ".$install_dir."/server/server.sh > /dev/null 2>> ".$conf['ispconfig_log_dir']."/cron.log",
- "30 00 * * * ".$install_dir."/server/cron_daily.sh > /dev/null 2>> ".$conf['ispconfig_log_dir']."/cron.log"
+ "* * * * * ".$install_dir."/server/server.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` \"\$line\" >> ".$conf['ispconfig_log_dir']."/cron.log; done",
+ "30 00 * * * ".$install_dir."/server/cron_daily.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` \"\$line\" >> ".$conf['ispconfig_log_dir']."/cron.log; done"
);
if ($conf['nginx']['installed'] == true) {
diff --git a/install/lib/mysql.lib.php b/install/lib/mysql.lib.php
index 0dc8f4bbbd9ba0e5589654122ed73d7d303ee009..b7f1ae8726373e0913d66b71f2b5c91505d0765f 100644
--- a/install/lib/mysql.lib.php
+++ b/install/lib/mysql.lib.php
@@ -35,7 +35,7 @@ class db
var $dbUser = ""; // database authorized user
var $dbPass = ""; // user's password
var $dbCharset = ""; // what charset comes and goes to mysql: utf8 / latin1
- var $linkId = 0; // last result of mysql_connect()
+ var $linkId = false; // last result of mysql_connect()
var $queryId = 0; // last result of mysql_query()
var $record = array(); // last record fetched
var $autoCommit = 1; // Autocommit Transactions
@@ -61,8 +61,8 @@ class db
// error handler
function updateError($location)
{
- $this->errorNumber = mysql_errno();
- $this->errorMessage = mysql_error();
+ $this->errorNumber = mysqli_errno($this->linkId);
+ $this->errorMessage = mysqli_error($this->linkId);
$this->errorLocation = $location;
if($this->errorNumber && $this->show_error_messages)
{
@@ -73,16 +73,16 @@ class db
function connect()
{
- if($this->linkId == 0)
+ if(!$this->linkId)
{
- $this->linkId = mysql_connect($this->dbHost, $this->dbUser, $this->dbPass);
+ $this->linkId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass);
if(!$this->linkId)
{
- $this->updateError('DB::connect()
mysql_connect');
+ $this->updateError('DB::connect()
mysqli_connect');
return false;
}
- $this->queryId = @mysql_query('SET NAMES '.$this->dbCharset, $this->linkId);
+ $this->queryId = @mysqli_query($this->linkId, 'SET NAMES '.$this->dbCharset);
}
return true;
}
@@ -94,14 +94,14 @@ class db
return false;
}
if($this->dbName != '') {
- if(!mysql_select_db($this->dbName, $this->linkId))
+ if(!mysqli_select_db($this->linkId, $this->dbName))
{
- $this->updateError('DB::connect()
mysql_select_db');
+ $this->updateError('DB::connect()
mysqli_select_db');
return false;
}
}
- $this->queryId = @mysql_query($queryString, $this->linkId);
- $this->updateError('DB::query('.$queryString.')
mysql_query');
+ $this->queryId = @mysqli_query($this->linkId, $queryString);
+ $this->updateError('DB::query('.$queryString.')
mysqli_query');
if(!$this->queryId)
{
return false;
@@ -138,8 +138,8 @@ class db
// returns the next record in an array
function nextRecord()
{
- $this->record = mysql_fetch_assoc($this->queryId);
- $this->updateError('DB::nextRecord()
mysql_fetch_array');
+ $this->record = mysqli_fetch_assoc($this->queryId);
+ $this->updateError('DB::nextRecord()
mysqli_fetch_array');
if(!$this->record || !is_array($this->record))
{
return false;
@@ -151,18 +151,18 @@ class db
// returns number of rows returned by the last select query
function numRows()
{
- return mysql_num_rows($this->queryId);
+ return mysqli_num_rows($this->queryId);
}
function affectedRows()
{
- return mysql_affected_rows($this->linkId);
+ return mysqli_affected_rows($this->linkId);
}
// returns mySQL insert id
function insertID()
{
- return mysql_insert_id($this->linkId);
+ return mysqli_insert_id($this->linkId);
}
// Check der variablen
@@ -175,7 +175,7 @@ class db
// Check der variablen
function quote($formfield)
{
- return mysql_real_escape_string($formfield);
+ return mysqli_real_escape_string($this->linkId, $formfield);
}
// Check der variablen
@@ -359,11 +359,22 @@ class db
if($database_name == ''){
$database_name = $this->dbName;
}
- $result = mysql_query("SHOW TABLES FROM `$database_name`");
+
+ $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 < mysql_num_rows($result); $i++) {
+ for ($i = 0; $i < mysqli_num_rows($result); $i++) {
$tb_names[$i] = mysql_tablename($result, $i);
}
+ */
return $tb_names;
}
@@ -438,35 +449,7 @@ class db
} else {
return false;
}
-
-
- //$this->createTable('tester',$columns);
-
- /*
- $result = mysql_list_fields($go_info["server"]["db_name"],$table_name);
- $fields = mysql_num_fields ($result);
- $i = 0;
- $table = mysql_field_table ($result, $i);
- while ($i < $fields) {
- $name = mysql_field_name ($result, $i);
- $type = mysql_field_type ($result, $i);
- $len = mysql_field_len ($result, $i);
- $flags = mysql_field_flags ($result, $i);
- print_r($flags);
-
- $columns = array(name => $name,
- type => "",
- defaultValue => "",
- isnull => 1,
- option => "");
- $returnvar[] = $columns;
-
- $i++;
- }
- */
-
-
-
+
}
function mapType($metaType,$typeValue) {
diff --git a/install/sql/incremental/upd_0055.sql b/install/sql/incremental/upd_0055.sql
index 7bcfa71f3f558b3966ea93a1dd9c16505f312398..3a7c5d58638f1166ea43118a79a9525505161d5d 100644
--- a/install/sql/incremental/upd_0055.sql
+++ b/install/sql/incremental/upd_0055.sql
@@ -1,2 +1,3 @@
ALTER TABLE `web_backup` CHANGE `backup_type` `backup_type` enum('web','mongodb','mysql') NOT NULL DEFAULT 'web';
ALTER TABLE `web_database_user` ADD `database_password_mongo` varchar(32) DEFAULT NULL AFTER `database_password`;
+ALTER TABLE `sys_datalog` ADD `error` MEDIUMTEXT NULL DEFAULT NULL;
diff --git a/install/sql/incremental/upd_0056.sql b/install/sql/incremental/upd_0056.sql
new file mode 100644
index 0000000000000000000000000000000000000000..c7cb5285cec66cbe19fa2c507668a09cf4aebb6d
--- /dev/null
+++ b/install/sql/incremental/upd_0056.sql
@@ -0,0 +1,12 @@
+CREATE TABLE `client_template_assigned` (
+ `assigned_template_id` bigint(20) NOT NULL auto_increment,
+ `client_id` bigint(11) NOT NULL DEFAULT '0',
+ `client_template_id` int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`assigned_template_id`),
+ KEY `client_id` (`client_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+ALTER TABLE `client` ADD `gender` enum('','m','f') NOT NULL DEFAULT '' AFTER `company_id`,
+ ADD `locked` enum('n','y') NOT NULL DEFAULT 'n' AFTER `created_at`,
+ ADD `canceled` enum('n','y') NOT NULL DEFAULT 'n' AFTER `locked`,
+ ADD `tmp_data` mediumblob AFTER `canceled` ;
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index e9bdf953172b4086bd57334fd4e6e8fbe310ab7f..8480e764481b16a4b88b2cea4a5c0aa60d4096b9 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -145,6 +145,7 @@ CREATE TABLE `client` (
`sys_perm_other` varchar(5) DEFAULT NULL,
`company_name` varchar(64) DEFAULT NULL,
`company_id` varchar(30) DEFAULT NULL,
+ `gender` enum('','m','f') NOT NULL DEFAULT '',
`contact_name` varchar(64) DEFAULT NULL,
`customer_no` varchar(64) DEFAULT NULL,
`vat_id` varchar(64) DEFAULT NULL,
@@ -225,6 +226,9 @@ CREATE TABLE `client` (
`template_master` int(11) unsigned NOT NULL DEFAULT '0',
`template_additional` text NOT NULL DEFAULT '',
`created_at` bigint(20) DEFAULT NULL,
+ `locked` enum('n','y') NOT NULL DEFAULT 'n',
+ `canceled` enum('n','y') NOT NULL DEFAULT 'n',
+ `tmp_data` mediumblob,
`id_rsa` varchar(2000) NOT NULL DEFAULT '',
`ssh_rsa` varchar(600) NOT NULL DEFAULT '',
PRIMARY KEY (`client_id`)
@@ -315,6 +319,19 @@ CREATE TABLE `client_template` (
-- --------------------------------------------------------
+--
+-- Table structure for table `client_template_assigned`
+--
+
+CREATE TABLE `client_template_assigned` (
+ `assigned_template_id` bigint(20) NOT NULL auto_increment,
+ `client_id` bigint(11) NOT NULL DEFAULT '0',
+ `client_template_id` int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`assigned_template_id`),
+ KEY `client_id` (`client_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+-- --------------------------------------------------------
+
--
-- Table structure for table `country`
--
@@ -1428,6 +1445,7 @@ CREATE TABLE `sys_datalog` (
`user` varchar(255) NOT NULL default '',
`data` longtext NOT NULL,
`status` set('pending','ok','warning','error') NOT NULL default 'ok',
+ `error` mediumtext,
PRIMARY KEY (`datalog_id`),
KEY `server_id` (`server_id`,`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -2179,6 +2197,6 @@ INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`,
-- Dumping data for table `sys_config`
--
-INSERT INTO sys_config VALUES ('1','db','db_version','3.0.5.2');
+INSERT INTO sys_config VALUES ('1','db','db_version','3.0.5.3');
SET FOREIGN_KEY_CHECKS = 1;
diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master
index 1c967327b59834db312157710e3f226e8cfd3532..8c8bedd2b73dde2a4ac8fadbdc12e8f59f7655a2 100644
--- a/install/tpl/config.inc.php.master
+++ b/install/tpl/config.inc.php.master
@@ -56,7 +56,7 @@ $revision = str_replace(array('Revision:','$',' '), '', $svn_revision);
//** Application
define('ISPC_APP_TITLE', 'ISPConfig');
-define('ISPC_APP_VERSION', '3.0.5.2');
+define('ISPC_APP_VERSION', '3.0.5.3');
define('DEVSYSTEM', 0);
diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master
index 24f7eba57355ced7fe800049d9cfb9461a71afdd..abb89311cda7c023659b22e2001974e36ced87e6 100644
--- a/install/tpl/system.ini.master
+++ b/install/tpl/system.ini.master
@@ -41,3 +41,9 @@ tab_change_warning=n
use_loadindicator=y
use_combobox=y
maintenance_mode=n
+admin_dashlets_left=
+admin_dashlets_right=
+reseller_dashlets_left=
+reseller_dashlets_right=
+client_dashlets_left=
+client_dashlets_right=
diff --git a/interface/lib/classes/aps_guicontroller.inc.php b/interface/lib/classes/aps_guicontroller.inc.php
index d8e641d9ab01a37229f6fe06df89560d4f56d117..5a5cbe9a7e13b0d29a7841ee690d8b21380eb209 100644
--- a/interface/lib/classes/aps_guicontroller.inc.php
+++ b/interface/lib/classes/aps_guicontroller.inc.php
@@ -1,846 +1,846 @@
-getDocNamespaces(true);
- foreach($namespaces as $ns => $url) $sxe->registerXPathNamespace($ns, $url);
-
- return $sxe;
- }
-
- /**
- * Applies a RegEx pattern onto a location path in order to secure it against
- * code injections and invalid input
- *
- * @param $location_unfiltered the file path to secure
- * @return $location
- */
- private function secureLocation($location_unfiltered)
- {
- // Filter invalid slashes from string
- $location = preg_replace(array('#/+#', '#\.+#', '#\0+#', '#\\\\+#'),
- array('/', '', '', '/'),
- $location_unfiltered);
-
- // Remove a beginning or trailing slash
- if(substr($location, -1) == '/') $location = substr($location, 0, strlen($location) - 1);
- if(substr($location, 0, 1) == '/') $location = substr($location, 1);
-
- return $location;
- }
-
- /**
- * Gets the CustomerID (ClientID) which belongs to a specific domain
- *
- * @param $domain the domain
- * @return $customerid
- */
- private function getCustomerIDFromDomain($domain)
- {
- global $app;
- $customerid = 0;
-
- $customerdata = $app->db->queryOneRecord("SELECT client_id FROM sys_group, web_domain
- WHERE web_domain.sys_groupid = sys_group.groupid
- AND web_domain.domain = '".$app->db->quote($domain)."';");
- if(!empty($customerdata)) $customerid = $customerdata['client_id'];
-
- return $customerid;
- }
-
- /**
- * Returns the server_id for an already installed instance. Is actually
- * just a little helper method to avoid redundant code
- *
- * @param $instanceid the instance to process
- * @return $webserver_id the server_id
- */
- private function getInstanceDataForDatalog($instanceid)
- {
- global $app;
- $webserver_id = '';
-
- $websrv = $app->db->queryOneRecord("SELECT server_id FROM web_domain
- WHERE domain = (SELECT value FROM aps_instances_settings
- WHERE name = 'main_domain' AND instance_id = ".$app->db->quote($instanceid).");");
-
- // If $websrv is empty, an error has occured. Domain no longer existing? Settings table damaged?
- // Anyhow, remove this instance record because it's not useful at all
- if(empty($websrv))
- {
- $app->db->query("DELETE FROM aps_instances WHERE id = ".$app->db->quote($instanceid).";");
- $app->db->query("DELETE FROM aps_instances_settings WHERE instance_id = ".$app->db->quote($instanceid).";");
- }
- else $webserver_id = $websrv['server_id'];
-
- return $webserver_id;
- }
-
- /**
- * Finds out if there is a newer package version for
- * a given (possibly valid) package ID
- *
- * @param $id the ID to check
- * @return $newer_pkg_id the newer package ID
- */
- public function getNewestPackageID($id)
- {
- global $app;
-
- if(preg_match('/^[0-9]+$/', $id) != 1) return 0;
-
- $result = $app->db->queryOneRecord("SELECT id, name,
- CONCAT(version, '-', CAST(`release` AS CHAR)) AS current_version
- FROM aps_packages
- WHERE name = (SELECT name FROM aps_packages WHERE id = ".$app->db->quote($id).")
- ORDER BY REPLACE(version, '.', '')+0 DESC, `release` DESC");
-
- if(!empty($result) && ($id != $result['id'])) return $result['id'];
-
- return 0;
- }
-
- /**
- * Validates a given package ID
- *
- * @param $id the ID to check
- * @param $is_admin a flag to allow locked IDs too (for admin calls)
- * @return boolean
- */
- public function isValidPackageID($id, $is_admin = false)
- {
- global $app;
-
- if(preg_match('/^[0-9]+$/', $id) != 1) return false;
-
- $sql_ext = (!$is_admin) ?
- 'package_status = '.PACKAGE_ENABLED.' AND' :
- '(package_status = '.PACKAGE_ENABLED.' OR package_status = '.PACKAGE_LOCKED.') AND';
-
- $result = $app->db->queryOneRecord("SELECT id FROM aps_packages WHERE ".$sql_ext." id = ".$app->db->quote($id).";");
- if(!$result) return false;
-
- return true;
- }
-
- /**
- * Validates a given instance ID
- *
- * @param $id the ID to check
- * @param $client_id the calling client ID
- * @param $is_admin a flag to ignore the client ID check for admins
- * @return boolean
- */
- public function isValidInstanceID($id, $client_id, $is_admin = false)
- {
- global $app;
-
- if(preg_match('/^[0-9]+$/', $id) != 1) return false;
-
- // Only filter if not admin
- $sql_ext = (!$is_admin) ? 'customer_id = '.$app->db->quote($client_id).' AND' : '';
-
- $result = $app->db->queryOneRecord('SELECT id FROM aps_instances WHERE '.$sql_ext.' id = '.$app->db->quote($id).';');
- if(!$result) return false;
-
- return true;
- }
-
- /**
- * Creates a new database record for the package instance and
- * an install task
- *
- * @param $settings the settings to enter into the DB
- * @param $packageid the PackageID
- */
- public function createPackageInstance($settings, $packageid)
- {
- global $app;
-
- $app->uses('tools_sites');
-
- $webserver_id = 0;
- $websrv = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain = '".$app->db->quote($settings['main_domain'])."';");
- if(!empty($websrv)) $webserver_id = $websrv['server_id'];
- $customerid = $this->getCustomerIDFromDomain($settings['main_domain']);
-
- if(empty($settings) || empty($webserver_id)) return false;
-
- //* Get server config of the web server
- $app->uses("getconf");
- $web_config = $app->getconf->get_server_config($app->functions->intval($websrv["server_id"]),'web');
-
- //* 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']);
- }
- } else {
- // nginx
- if($websrv['php'] != 'php-fpm' && $websrv['php'] != 'fast-cgi') {
- $app->db->datalogUpdate('web_domain', "php = 'php-fpm'", 'domain_id', $websrv['domain_id']);
- }
- }
-
-
- //* Create the MySQL database for the application
- $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 = ".$websrv['server_id']);
- if($web_server['db_server'] == 1) {
- // create database on "localhost" (webserver)
- $mysql_db_server_id = $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 = ".$websrv['sys_groupid']);
- if(is_array($client) && $client['default_dbserver'] > 0 && $client['default_dbserver'] != $websrv['server_id']) {
- $mysql_db_server_id = $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 = ($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 = ($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( ".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$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( ".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$websrv['sys_perm_group']."', '', $mysql_db_server_id, ".$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', ".$websrv['backup_copies'].", 'y', '".$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;
-
- }
-
- //* 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 (".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$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');
-
- //* 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)."')";
- $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);
- }
-
- /**
- * 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)
- {
- global $app;
- /*
- $app->db->query("UPDATE aps_instances SET instance_status = ".INSTANCE_REMOVE." WHERE id = ".$instanceid.";");
-
- $webserver_id = $this->getInstanceDataForDatalog($instanceid);
- if($webserver_id == '') return;
-
- // Create a sys_datalog entry for deletion
- $datalog = array('Instance_id' => $instanceid, 'server_id' => $webserver_id);
- $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.value = 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 = ".$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
- *
- * @param $id the internal ID of the package
- * @return array
- */
- public function getPackageSettings($id)
- {
- global $app;
-
- $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($id).';');
-
- // Load in meta file if existing and register its namespaces
- $metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml';
- if(!file_exists($metafile))
- return array('error' => 'The metafile for '.$settings['Name'].' couldn\'t be found');
-
- $sxe = $this->readInMetaFile($metafile);
-
- $groupsettings = parent::getXPathValue($sxe, '//settings/group/setting', true);
- if(empty($groupsettings)) return array();
-
- $settings = array();
- foreach($groupsettings as $setting)
- {
- $setting_id = strval($setting['id']);
-
- if($setting['type'] == 'string' || $setting['type'] == 'email' || $setting['type'] == 'integer'
- || $setting['type'] == 'float' || $setting['type'] == 'domain-name')
- {
- $settings[] = array('SettingID' => $setting_id,
- 'SettingName' => $setting->name,
- 'SettingDescription' => $setting->description,
- 'SettingType' => $setting['type'],
- 'SettingInputType' => 'string',
- 'SettingDefaultValue' => strval($setting['default-value']),
- 'SettingRegex' => $setting['regex'],
- 'SettingMinLength' => $setting['min-length'],
- 'SettingMaxLength' => $setting['max-length']);
- }
- else if($setting['type'] == 'password')
- {
- $settings[] = array('SettingID' => $setting_id,
- 'SettingName' => $setting->name,
- 'SettingDescription' => $setting->description,
- 'SettingType' => 'password',
- 'SettingInputType' => 'password',
- 'SettingDefaultValue' => '',
- 'SettingRegex' => $setting['regex'],
- 'SettingMinLength' => $setting['min-length'],
- 'SettingMaxLength' => $setting['max-length']);
- }
- else if($setting['type'] == 'boolean')
- {
- $settings[] = array('SettingID' => $setting_id,
- 'SettingName' => $setting->name,
- 'SettingDescription' => $setting->description,
- 'SettingType' => 'boolean',
- 'SettingInputType' => 'checkbox',
- 'SettingDefaultValue' => strval($setting['default-value']));
- }
- else if($setting['type'] == 'enum')
- {
- $choices = array();
- foreach($setting->choice as $choice)
- {
- $choices[] = array('EnumID' => strval($choice['id']),
- 'EnumName' => $choice->name);
- }
- $settings[] = array('SettingID' => $setting_id,
- 'SettingName' => $setting->name,
- 'SettingDescription' => $setting->description,
- 'SettingType' => 'enum',
- 'SettingInputType' => 'select',
- 'SettingDefaultValue' => strval($setting['default-value']),
- 'SettingChoices' => $choices);
- }
- }
-
- return $settings;
- }
-
- /**
- * Validates the user input according to the settings array and
- * delivers errors if occurring
- *
- * @param $input the user $_POST array
- * @param $pkg_details the package details
- * @param $settings the package settings array
- * @return array in this structure:
- * array(2) {
- * ["input"]=> ...
- * ["errors"]=> ...
- * }
- */
- public function validateInstallerInput($postinput, $pkg_details, $domains, $settings = array())
- {
- global $app;
-
- $ret = array();
- $input = array();
- $error = array();
-
- // Main domain (obligatory)
- if(isset($postinput['main_domain']))
- {
- if(!in_array($postinput['main_domain'], $domains)) $error[] = $app->lng('error_main_domain');
- else $input['main_domain'] = $postinput['main_domain'];
- }
- else $error[] = $app->lng('error_main_domain');
-
- // Main location (not obligatory but must be supplied)
- if(isset($postinput['main_location']))
- {
- $temp_errstr = '';
- // It can be empty but if the user did write something, check it
- $userinput = false;
- if(strlen($postinput['main_location']) > 0) $userinput = true;
-
- // Filter invalid input slashes (twice!)
- $main_location = $this->secureLocation($postinput['main_location']);
- $main_location = $this->secureLocation($main_location);
- // Only allow digits, words, / and -
- $main_location = preg_replace("/[^\d\w\/\-]/i", "", $main_location);
- if($userinput && (strlen($main_location) == 0)) $temp_errstr = $app->lng('error_inv_main_location');
-
- // Find out document_root and make sure no apps are installed twice to one location
- if(in_array($postinput['main_domain'], $domains))
- {
- $docroot = $app->db->queryOneRecord("SELECT document_root FROM web_domain
- WHERE domain = '".$app->db->quote($postinput['main_domain'])."';");
- $new_path = $docroot['document_root'];
- if(substr($new_path, -1) != '/') $new_path .= '/';
- $new_path .= $main_location;
-
- // Get the $customerid which belongs to the selected domain
- $customerid = $this->getCustomerIDFromDomain($postinput['main_domain']);
-
- // First get all domains used for an install, then their loop them
- // and get the corresponding document roots as well as the defined
- // locations. If an existing doc_root + location matches with the
- // new one -> error
- $instance_domains = $app->db->queryAllRecords("SELECT instance_id, s.value AS domain
- FROM aps_instances AS i, aps_instances_settings AS s
- WHERE i.id = s.instance_id AND s.name = 'main_domain'
- AND i.customer_id = '".$app->db->quote($customerid)."';");
- for($i = 0; $i < count($instance_domains); $i++)
- {
- $used_path = '';
-
- $doc_root = $app->db->queryOneRecord("SELECT document_root FROM web_domain
- WHERE domain = '".$app->db->quote($instance_domains[$i]['domain'])."';");
-
- // Probably the domain settings were changed later, so make sure the doc_root
- // is not empty for further validation
- if(!empty($doc_root))
- {
- $used_path = $doc_root['document_root'];
- if(substr($used_path, -1) != '/') $used_path .= '/';
-
- $location_for_domain = $app->db->queryOneRecord("SELECT value
- FROM aps_instances_settings WHERE name = 'main_location'
- AND instance_id = '".$app->db->quote($instance_domains[$i]['instance_id'])."';");
-
- // The location might be empty but the DB return must not be false!
- if($location_for_domain) $used_path .= $location_for_domain['value'];
-
- if($new_path == $used_path)
- {
- $temp_errstr = $app->lng('error_used_location');
- break;
- }
- }
- }
- }
- else $temp_errstr = $app->lng('error_main_domain');
-
- if($temp_errstr == '') $input['main_location'] = htmlspecialchars($main_location);
- else $error[] = $temp_errstr;
- }
- else $error[] = $app->lng('error_no_main_location');
-
- // License (the checkbox must be set)
- if(isset($pkg_details['License need agree'])
- && $pkg_details['License need agree'] == 'true')
- {
- if(isset($postinput['license']) && $postinput['license'] == 'on') $input['license'] = 'true';
- else $error[] = $app->lng('error_license_agreement');
- }
-
- // Database
- if(isset($pkg_details['Requirements Database'])
- && $pkg_details['Requirements Database'] != '')
- {
- if(isset($postinput['main_database_password']))
- {
- if($postinput['main_database_password'] == '') $error[] = $app->lng('error_no_database_pw');
- else if(strlen($postinput['main_database_password']) > 8)
- $input['main_database_password'] = htmlspecialchars($postinput['main_database_password']);
- else $error[] = $app->lng('error_short_database_pw');
- }
- else $error[] = $app->lng('error_no_database_pw');
- }
-
- // Validate the package settings
- foreach($settings as $setting)
- {
- $temp_errstr = '';
- $setting_id = strval($setting['SettingID']);
-
- // We assume that every setting must be set
- if((isset($postinput[$setting_id]) && ($postinput[$setting_id] != ''))
- || ($setting['SettingType'] == 'boolean'))
- {
- if($setting['SettingType'] == 'string' || $setting['SettingType'] == 'password')
- {
- if($app->functions->intval($setting['SettingMinLength'], true) != 0
- && strlen($postinput[$setting_id]) < $app->functions->intval($setting['SettingMinLength'], true))
- $temp_errstr = sprintf($app->lng('error_short_value_for'), $setting['setting_name']);
-
- if($app->functions->intval($setting['SettingMaxLength'], true) != 0
- && strlen($postinput[$setting_id]) > $app->functions->intval($setting['SettingMaxLength'], true))
- $temp_errstr = sprintf($app->lng('error_long_value_for'), $setting['setting_name']);
-
- if(isset($setting['SettingRegex'])
- && !preg_match("/".$setting['SettingRegex']."/", $postinput[$setting_id]))
- $temp_errstr = sprintf($app->lng('error_inv_value_for'), $setting['setting_name']);
- }
- else if($setting['SettingType'] == 'email')
- {
- if(filter_var(strtolower($postinput[$setting_id]), FILTER_VALIDATE_EMAIL) === false)
- $temp_errstr = sprintf($app->lng('error_inv_email_for'), $setting['setting_name']);
- }
- else if($setting['SettingType'] == 'domain-name')
- {
- if(!preg_match("^(http|https)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&%\$#\=~_\-]+))*$",
- $postinput[$setting_id]))
- $temp_errstr = sprintf($app->lng('error_inv_domain_for'), $setting['setting_name']);
- }
- else if($setting['SettingType'] == 'integer')
- {
- if(filter_var($postinput[$setting_id], FILTER_VALIDATE_INT) === false)
- $temp_errstr = sprintf($app->lng('error_inv_integer_for'), $setting['setting_name']);
- }
- else if($setting['SettingType'] == 'float')
- {
- if(filter_var($postinput[$setting_id], FILTER_VALIDATE_FLOAT) === false)
- $temp_errstr = sprintf($app->lng('error_inv_float_for'), $setting['setting_name']);
- }
- else if($setting['SettingType'] == 'boolean')
- {
- // If we have a boolean value set, it must be either true or false
- if(!isset($postinput[$setting_id])) $postinput[$setting_id] = 'false';
- else if(isset($postinput[$setting_id]) && $postinput[$setting_id] != 'true')
- $postinput[$setting_id] = 'true';
- }
- else if($setting['SettingType'] == 'enum')
- {
- $found = false;
- for($i = 0; $i < count($setting['SettingChoices']); $i++)
- {
- if($setting['SettingChoices'][$i]['EnumID'] == $postinput[$setting_id])
- $found = true;
- }
- if(!$found) $temp_errstr = sprintf($app->lng('error_inv_value_for'), $setting['SettingName']);
- }
-
- if($temp_errstr == '') $input[$setting_id] = $postinput[$setting_id];
- else $error[] = $temp_errstr;
- }
- else $error[] = sprintf($app->lng('error_no_value_for'), $setting['SettingName']);
- }
-
- $ret['input'] = $input;
- $ret['error'] = array_unique($error);
-
- return $ret;
- }
-
- /**
- * Read the metadata of a package and returns some content
- *
- * @param $id the internal ID of the package
- * @return array
- */
- public function getPackageDetails($id)
- {
- global $app;
-
- $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($id).';');
-
- // Load in meta file if existing and register its namespaces
- $metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml';
- if(!file_exists($metafile))
- return array('error' => 'The metafile for '.$pkg['name'].' couldn\'t be found');
-
- $metadata = file_get_contents($metafile);
- $metadata = str_replace("xmlns=", "ns=", $metadata);
- $sxe = new SimpleXMLElement($metadata);
- $namespaces = $sxe->getDocNamespaces(true);
- foreach($namespaces as $ns => $url) $sxe->registerXPathNamespace($ns, $url);
-
- $pkg['Summary'] = htmlspecialchars(parent::getXPathValue($sxe, '//summary'));
- $pkg['Homepage'] = parent::getXPathValue($sxe, '//homepage');
- $pkg['Description'] = nl2br(htmlspecialchars(trim(parent::getXPathValue($sxe, '//description'))));
- $pkg['Config script'] = strtoupper(parent::getXPathValue($sxe, '//configuration-script-language'));
- $installed_size = parent::getXPathValue($sxe, '//installed-size');
- $pkg['Installed Size'] = (!empty($installed_size)) ? parent::convertSize((int)$installed_size) : '';
-
- // License
- $pkg['License need agree'] = parent::getXPathValue($sxe, '//license/@must-accept');
- $pkg['License name'] = parent::getXPathValue($sxe, '//license/text/name'); // might be empty
- $pkg['License type'] = 'file'; // default type
- $pkg['License content'] = ''; // default license filename on local system
- $license_url = parent::getXPathValue($sxe, '//license/text/url');
- if(!empty($license_url))
- {
- $pkg['License type'] = 'url';
- $pkg['License content'] = htmlspecialchars($license_url);
- }
- else
- {
- $lic = @file_get_contents($this->interface_pkg_dir.'/'.$pkg['path'].'/LICENSE');
- $pkg['License content'] = htmlentities($lic, ENT_QUOTES, 'ISO-8859-1');
- }
-
- // Languages
- $languages = parent::getXPathValue($sxe, '//languages/language', true);
- $pkg['Languages'] = (is_array($languages)) ? implode(' ', $languages) : '';
-
- // Icon
- $icon = parent::getXPathValue($sxe, '//icon/@path');
- if(!empty($icon))
- {
- // Using parse_url() to filter malformed URLs
- $path = dirname(parse_url($_SERVER['PHP_SELF'], PHP_URL_PATH)).'/'.
- basename($this->interface_pkg_dir).'/'.$pkg['path'].'/'.basename((string)$icon);
- // nginx: if $_SERVER['PHP_SELF'] is doubled, remove /sites/aps_packagedetails_show.php from beginning of path
- $path = preg_replace('@^/sites/aps_packagedetails_show.php(.*)@', '$1', $path);
-
- $pkg['Icon'] = $path;
- }
- else $pkg['Icon'] = '';
-
- // Screenshots
- $screenshots = parent::getXPathValue($sxe, '//screenshot', true);
- if(!empty($screenshots))
- {
- foreach($screenshots as $screen)
- {
- // Using parse_url() to filter malformed URLs
- $path = dirname(parse_url($_SERVER['PHP_SELF'], PHP_URL_PATH)).'/'.
- basename($this->interface_pkg_dir).'/'.$pkg['path'].'/'.basename((string)$screen['path']);
- // nginx: if $_SERVER['PHP_SELF'] is doubled, remove /sites/aps_packagedetails_show.php from beginning of path
- $path = preg_replace('@^/sites/aps_packagedetails_show.php(.*)@', '$1', $path);
-
- $pkg['Screenshots'][] = array('ScreenPath' => $path,
- 'ScreenDescription' => htmlspecialchars(trim((string)$screen->description)));
- }
- }
- else $pkg['Screenshots'] = ''; // if no screenshots are available, set the variable though
-
- // Changelog
- $changelog = parent::getXPathValue($sxe, '//changelog/version', true);
- if(!empty($changelog))
- {
- foreach($changelog as $change)
- {
- $entries = array();
- foreach($change->entry as $entry) $entries[] = htmlspecialchars(trim((string)$entry));
-
- $pkg['Changelog'][] = array('ChangelogVersion' => (string)$change['version'],
- 'ChangelogDescription' => implode('
', $entries));
- }
- }
-
- else $pkg['Changelog'] = '';
-
- // PHP extensions
- $php_extensions = parent::getXPathValue($sxe, '//php:extension', true);
- $php_ext = '';
- if(!empty($php_extensions))
- {
- foreach($php_extensions as $extension)
- {
- if(strtolower($extension) == 'php') continue;
- $php_ext .= $extension.' ';
- }
- }
- $pkg['Requirements PHP extensions'] = trim($php_ext);
-
- // PHP bool options
- $pkg['Requirements PHP settings'] = '';
- $php_bool_options = array('allow-url-fopen', 'file-uploads', 'magic-quotes-gpc',
- 'register-globals', 'safe-mode', 'short-open-tag');
- foreach($php_bool_options as $option)
- {
- $value = parent::getXPathValue($sxe, '//php:'.$option);
- if(!empty($value))
- {
- $option = str_replace('-', '_', $option);
- $value = str_replace(array('false', 'true'), array('off', 'on'), $value);
- $pkg['Requirements PHP settings'][] = array('PHPSettingName' => $option,
- 'PHPSettingValue' => $value);
- }
- }
-
- // PHP integer value settings
- $memory_limit = parent::getXPathValue($sxe, '//php:memory-limit');
- if(!empty($memory_limit))
- $pkg['Requirements PHP settings'][] = array('PHPSettingName' => 'memory_limit',
- 'PHPSettingValue' => parent::convertSize((int)$memory_limit));
-
- $max_exec_time = parent::getXPathValue($sxe, '//php:max-execution-time');
- if(!empty($max_exec_time))
- $pkg['Requirements PHP settings'][] = array('PHPSettingName' => 'max-execution-time',
- 'PHPSettingValue' => $max_exec_time);
-
- $post_max_size = parent::getXPathValue($sxe, '//php:post-max-size');
- if(!empty($post_max_size))
- $pkg['Requirements PHP settings'][] = array('PHPSettingName' => 'post_max_size',
- 'PHPSettingValue' => parent::convertSize((int)$post_max_size));
-
- // Get supported PHP versions
- $pkg['Requirements Supported PHP versions'] = '';
- $php_min_version = parent::getXPathValue($sxe, '//php:version/@min');
- $php_max_not_including = parent::getXPathValue($sxe, '//php:version/@max-not-including');
- if(!empty($php_min_version) && !empty($php_max_not_including))
- $pkg['Requirements Supported PHP versions'] = $php_min_version.' - '.$php_max_not_including;
- else if(!empty($php_min_version))
- $pkg['Requirements Supported PHP versions'] = '> '.$php_min_version;
- else if(!empty($php_max_not_including))
- $pkg['Requirements Supported PHP versions'] = '< '.$php_min_version;
-
- // Database
- $db_id = parent::getXPathValue($sxe, '//db:id');
- $db_server_type = parent::getXPathValue($sxe, '//db:server-type');
- $db_min_version = parent::getXPathValue($sxe, '//db:server-min-version');
- if(!empty($db_id))
- {
- $db_server_type = str_replace('postgresql', 'PostgreSQL', $db_server_type);
- $db_server_type = str_replace('microsoft:sqlserver', 'MSSQL', $db_server_type);
- $db_server_type = str_replace('mysql', 'MySQL', $db_server_type);
-
- $pkg['Requirements Database'] = $db_server_type;
- if(!empty($db_min_version)) $pkg['Requirements Database'] .= ' > '.$db_min_version;
- }
- else $pkg['Requirements Database'] = '';
-
- return $pkg;
- }
-}
-?>
+getDocNamespaces(true);
+ foreach($namespaces as $ns => $url) $sxe->registerXPathNamespace($ns, $url);
+
+ return $sxe;
+ }
+
+ /**
+ * Applies a RegEx pattern onto a location path in order to secure it against
+ * code injections and invalid input
+ *
+ * @param $location_unfiltered the file path to secure
+ * @return $location
+ */
+ private function secureLocation($location_unfiltered)
+ {
+ // Filter invalid slashes from string
+ $location = preg_replace(array('#/+#', '#\.+#', '#\0+#', '#\\\\+#'),
+ array('/', '', '', '/'),
+ $location_unfiltered);
+
+ // Remove a beginning or trailing slash
+ if(substr($location, -1) == '/') $location = substr($location, 0, strlen($location) - 1);
+ if(substr($location, 0, 1) == '/') $location = substr($location, 1);
+
+ return $location;
+ }
+
+ /**
+ * Gets the CustomerID (ClientID) which belongs to a specific domain
+ *
+ * @param $domain the domain
+ * @return $customerid
+ */
+ private function getCustomerIDFromDomain($domain)
+ {
+ global $app;
+ $customerid = 0;
+
+ $customerdata = $app->db->queryOneRecord("SELECT client_id FROM sys_group, web_domain
+ WHERE web_domain.sys_groupid = sys_group.groupid
+ AND web_domain.domain = '".$app->db->quote($domain)."';");
+ if(!empty($customerdata)) $customerid = $customerdata['client_id'];
+
+ return $customerid;
+ }
+
+ /**
+ * Returns the server_id for an already installed instance. Is actually
+ * just a little helper method to avoid redundant code
+ *
+ * @param $instanceid the instance to process
+ * @return $webserver_id the server_id
+ */
+ private function getInstanceDataForDatalog($instanceid)
+ {
+ global $app;
+ $webserver_id = '';
+
+ $websrv = $app->db->queryOneRecord("SELECT server_id FROM web_domain
+ WHERE domain = (SELECT value FROM aps_instances_settings
+ WHERE name = 'main_domain' AND instance_id = ".$app->db->quote($instanceid).");");
+
+ // If $websrv is empty, an error has occured. Domain no longer existing? Settings table damaged?
+ // Anyhow, remove this instance record because it's not useful at all
+ if(empty($websrv))
+ {
+ $app->db->query("DELETE FROM aps_instances WHERE id = ".$app->db->quote($instanceid).";");
+ $app->db->query("DELETE FROM aps_instances_settings WHERE instance_id = ".$app->db->quote($instanceid).";");
+ }
+ else $webserver_id = $websrv['server_id'];
+
+ return $webserver_id;
+ }
+
+ /**
+ * Finds out if there is a newer package version for
+ * a given (possibly valid) package ID
+ *
+ * @param $id the ID to check
+ * @return $newer_pkg_id the newer package ID
+ */
+ public function getNewestPackageID($id)
+ {
+ global $app;
+
+ if(preg_match('/^[0-9]+$/', $id) != 1) return 0;
+
+ $result = $app->db->queryOneRecord("SELECT id, name,
+ CONCAT(version, '-', CAST(`release` AS CHAR)) AS current_version
+ FROM aps_packages
+ WHERE name = (SELECT name FROM aps_packages WHERE id = ".$app->db->quote($id).")
+ ORDER BY REPLACE(version, '.', '')+0 DESC, `release` DESC");
+
+ if(!empty($result) && ($id != $result['id'])) return $result['id'];
+
+ return 0;
+ }
+
+ /**
+ * Validates a given package ID
+ *
+ * @param $id the ID to check
+ * @param $is_admin a flag to allow locked IDs too (for admin calls)
+ * @return boolean
+ */
+ public function isValidPackageID($id, $is_admin = false)
+ {
+ global $app;
+
+ if(preg_match('/^[0-9]+$/', $id) != 1) return false;
+
+ $sql_ext = (!$is_admin) ?
+ 'package_status = '.PACKAGE_ENABLED.' AND' :
+ '(package_status = '.PACKAGE_ENABLED.' OR package_status = '.PACKAGE_LOCKED.') AND';
+
+ $result = $app->db->queryOneRecord("SELECT id FROM aps_packages WHERE ".$sql_ext." id = ".$app->db->quote($id).";");
+ if(!$result) return false;
+
+ return true;
+ }
+
+ /**
+ * Validates a given instance ID
+ *
+ * @param $id the ID to check
+ * @param $client_id the calling client ID
+ * @param $is_admin a flag to ignore the client ID check for admins
+ * @return boolean
+ */
+ public function isValidInstanceID($id, $client_id, $is_admin = false)
+ {
+ global $app;
+
+ if(preg_match('/^[0-9]+$/', $id) != 1) return false;
+
+ // Only filter if not admin
+ $sql_ext = (!$is_admin) ? 'customer_id = '.$app->db->quote($client_id).' AND' : '';
+
+ $result = $app->db->queryOneRecord('SELECT id FROM aps_instances WHERE '.$sql_ext.' id = '.$app->db->quote($id).';');
+ if(!$result) return false;
+
+ return true;
+ }
+
+ /**
+ * Creates a new database record for the package instance and
+ * an install task
+ *
+ * @param $settings the settings to enter into the DB
+ * @param $packageid the PackageID
+ */
+ public function createPackageInstance($settings, $packageid)
+ {
+ global $app;
+
+ $app->uses('tools_sites');
+
+ $webserver_id = 0;
+ $websrv = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain = '".$app->db->quote($settings['main_domain'])."';");
+ if(!empty($websrv)) $webserver_id = $websrv['server_id'];
+ $customerid = $this->getCustomerIDFromDomain($settings['main_domain']);
+
+ if(empty($settings) || empty($webserver_id)) return false;
+
+ //* Get server config of the web server
+ $app->uses("getconf");
+ $web_config = $app->getconf->get_server_config($app->functions->intval($websrv["server_id"]),'web');
+
+ //* 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']);
+ }
+ } else {
+ // nginx
+ if($websrv['php'] != 'php-fpm' && $websrv['php'] != 'fast-cgi') {
+ $app->db->datalogUpdate('web_domain', "php = 'php-fpm'", 'domain_id', $websrv['domain_id']);
+ }
+ }
+
+
+ //* Create the MySQL database for the application
+ $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 = ".$websrv['server_id']);
+ if($web_server['db_server'] == 1) {
+ // create database on "localhost" (webserver)
+ $mysql_db_server_id = $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 = ".$websrv['sys_groupid']);
+ if(is_array($client) && $client['default_dbserver'] > 0 && $client['default_dbserver'] != $websrv['server_id']) {
+ $mysql_db_server_id = $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 = ($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 = ($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( ".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$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( ".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$websrv['sys_perm_group']."', '', $mysql_db_server_id, ".$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', ".$websrv['backup_copies'].", 'y', '".$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;
+
+ }
+
+ //* 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 (".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$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');
+
+ //* 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)."')";
+ $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);
+ }
+
+ /**
+ * 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)
+ {
+ global $app;
+ /*
+ $app->db->query("UPDATE aps_instances SET instance_status = ".INSTANCE_REMOVE." WHERE id = ".$instanceid.";");
+
+ $webserver_id = $this->getInstanceDataForDatalog($instanceid);
+ if($webserver_id == '') return;
+
+ // Create a sys_datalog entry for deletion
+ $datalog = array('Instance_id' => $instanceid, 'server_id' => $webserver_id);
+ $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);
+
+ $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 = ".$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
+ *
+ * @param $id the internal ID of the package
+ * @return array
+ */
+ public function getPackageSettings($id)
+ {
+ global $app;
+
+ $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($id).';');
+
+ // Load in meta file if existing and register its namespaces
+ $metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml';
+ if(!file_exists($metafile))
+ return array('error' => 'The metafile for '.$settings['Name'].' couldn\'t be found');
+
+ $sxe = $this->readInMetaFile($metafile);
+
+ $groupsettings = parent::getXPathValue($sxe, '//settings/group/setting', true);
+ if(empty($groupsettings)) return array();
+
+ $settings = array();
+ foreach($groupsettings as $setting)
+ {
+ $setting_id = strval($setting['id']);
+
+ if($setting['type'] == 'string' || $setting['type'] == 'email' || $setting['type'] == 'integer'
+ || $setting['type'] == 'float' || $setting['type'] == 'domain-name')
+ {
+ $settings[] = array('SettingID' => $setting_id,
+ 'SettingName' => $setting->name,
+ 'SettingDescription' => $setting->description,
+ 'SettingType' => $setting['type'],
+ 'SettingInputType' => 'string',
+ 'SettingDefaultValue' => strval($setting['default-value']),
+ 'SettingRegex' => $setting['regex'],
+ 'SettingMinLength' => $setting['min-length'],
+ 'SettingMaxLength' => $setting['max-length']);
+ }
+ else if($setting['type'] == 'password')
+ {
+ $settings[] = array('SettingID' => $setting_id,
+ 'SettingName' => $setting->name,
+ 'SettingDescription' => $setting->description,
+ 'SettingType' => 'password',
+ 'SettingInputType' => 'password',
+ 'SettingDefaultValue' => '',
+ 'SettingRegex' => $setting['regex'],
+ 'SettingMinLength' => $setting['min-length'],
+ 'SettingMaxLength' => $setting['max-length']);
+ }
+ else if($setting['type'] == 'boolean')
+ {
+ $settings[] = array('SettingID' => $setting_id,
+ 'SettingName' => $setting->name,
+ 'SettingDescription' => $setting->description,
+ 'SettingType' => 'boolean',
+ 'SettingInputType' => 'checkbox',
+ 'SettingDefaultValue' => strval($setting['default-value']));
+ }
+ else if($setting['type'] == 'enum')
+ {
+ $choices = array();
+ foreach($setting->choice as $choice)
+ {
+ $choices[] = array('EnumID' => strval($choice['id']),
+ 'EnumName' => $choice->name);
+ }
+ $settings[] = array('SettingID' => $setting_id,
+ 'SettingName' => $setting->name,
+ 'SettingDescription' => $setting->description,
+ 'SettingType' => 'enum',
+ 'SettingInputType' => 'select',
+ 'SettingDefaultValue' => strval($setting['default-value']),
+ 'SettingChoices' => $choices);
+ }
+ }
+
+ return $settings;
+ }
+
+ /**
+ * Validates the user input according to the settings array and
+ * delivers errors if occurring
+ *
+ * @param $input the user $_POST array
+ * @param $pkg_details the package details
+ * @param $settings the package settings array
+ * @return array in this structure:
+ * array(2) {
+ * ["input"]=> ...
+ * ["errors"]=> ...
+ * }
+ */
+ public function validateInstallerInput($postinput, $pkg_details, $domains, $settings = array())
+ {
+ global $app;
+
+ $ret = array();
+ $input = array();
+ $error = array();
+
+ // Main domain (obligatory)
+ if(isset($postinput['main_domain']))
+ {
+ if(!in_array($postinput['main_domain'], $domains)) $error[] = $app->lng('error_main_domain');
+ else $input['main_domain'] = $postinput['main_domain'];
+ }
+ else $error[] = $app->lng('error_main_domain');
+
+ // Main location (not obligatory but must be supplied)
+ if(isset($postinput['main_location']))
+ {
+ $temp_errstr = '';
+ // It can be empty but if the user did write something, check it
+ $userinput = false;
+ if(strlen($postinput['main_location']) > 0) $userinput = true;
+
+ // Filter invalid input slashes (twice!)
+ $main_location = $this->secureLocation($postinput['main_location']);
+ $main_location = $this->secureLocation($main_location);
+ // Only allow digits, words, / and -
+ $main_location = preg_replace("/[^\d\w\/\-]/i", "", $main_location);
+ if($userinput && (strlen($main_location) == 0)) $temp_errstr = $app->lng('error_inv_main_location');
+
+ // Find out document_root and make sure no apps are installed twice to one location
+ if(in_array($postinput['main_domain'], $domains))
+ {
+ $docroot = $app->db->queryOneRecord("SELECT document_root FROM web_domain
+ WHERE domain = '".$app->db->quote($postinput['main_domain'])."';");
+ $new_path = $docroot['document_root'];
+ if(substr($new_path, -1) != '/') $new_path .= '/';
+ $new_path .= $main_location;
+
+ // Get the $customerid which belongs to the selected domain
+ $customerid = $this->getCustomerIDFromDomain($postinput['main_domain']);
+
+ // First get all domains used for an install, then their loop them
+ // and get the corresponding document roots as well as the defined
+ // locations. If an existing doc_root + location matches with the
+ // new one -> error
+ $instance_domains = $app->db->queryAllRecords("SELECT instance_id, s.value AS domain
+ FROM aps_instances AS i, aps_instances_settings AS s
+ WHERE i.id = s.instance_id AND s.name = 'main_domain'
+ AND i.customer_id = '".$app->db->quote($customerid)."';");
+ for($i = 0; $i < count($instance_domains); $i++)
+ {
+ $used_path = '';
+
+ $doc_root = $app->db->queryOneRecord("SELECT document_root FROM web_domain
+ WHERE domain = '".$app->db->quote($instance_domains[$i]['domain'])."';");
+
+ // Probably the domain settings were changed later, so make sure the doc_root
+ // is not empty for further validation
+ if(!empty($doc_root))
+ {
+ $used_path = $doc_root['document_root'];
+ if(substr($used_path, -1) != '/') $used_path .= '/';
+
+ $location_for_domain = $app->db->queryOneRecord("SELECT value
+ FROM aps_instances_settings WHERE name = 'main_location'
+ AND instance_id = '".$app->db->quote($instance_domains[$i]['instance_id'])."';");
+
+ // The location might be empty but the DB return must not be false!
+ if($location_for_domain) $used_path .= $location_for_domain['value'];
+
+ if($new_path == $used_path)
+ {
+ $temp_errstr = $app->lng('error_used_location');
+ break;
+ }
+ }
+ }
+ }
+ else $temp_errstr = $app->lng('error_main_domain');
+
+ if($temp_errstr == '') $input['main_location'] = htmlspecialchars($main_location);
+ else $error[] = $temp_errstr;
+ }
+ else $error[] = $app->lng('error_no_main_location');
+
+ // License (the checkbox must be set)
+ if(isset($pkg_details['License need agree'])
+ && $pkg_details['License need agree'] == 'true')
+ {
+ if(isset($postinput['license']) && $postinput['license'] == 'on') $input['license'] = 'true';
+ else $error[] = $app->lng('error_license_agreement');
+ }
+
+ // Database
+ if(isset($pkg_details['Requirements Database'])
+ && $pkg_details['Requirements Database'] != '')
+ {
+ if(isset($postinput['main_database_password']))
+ {
+ if($postinput['main_database_password'] == '') $error[] = $app->lng('error_no_database_pw');
+ else if(strlen($postinput['main_database_password']) > 8)
+ $input['main_database_password'] = htmlspecialchars($postinput['main_database_password']);
+ else $error[] = $app->lng('error_short_database_pw');
+ }
+ else $error[] = $app->lng('error_no_database_pw');
+ }
+
+ // Validate the package settings
+ foreach($settings as $setting)
+ {
+ $temp_errstr = '';
+ $setting_id = strval($setting['SettingID']);
+
+ // We assume that every setting must be set
+ if((isset($postinput[$setting_id]) && ($postinput[$setting_id] != ''))
+ || ($setting['SettingType'] == 'boolean'))
+ {
+ if($setting['SettingType'] == 'string' || $setting['SettingType'] == 'password')
+ {
+ if($app->functions->intval($setting['SettingMinLength'], true) != 0
+ && strlen($postinput[$setting_id]) < $app->functions->intval($setting['SettingMinLength'], true))
+ $temp_errstr = sprintf($app->lng('error_short_value_for'), $setting['setting_name']);
+
+ if($app->functions->intval($setting['SettingMaxLength'], true) != 0
+ && strlen($postinput[$setting_id]) > $app->functions->intval($setting['SettingMaxLength'], true))
+ $temp_errstr = sprintf($app->lng('error_long_value_for'), $setting['setting_name']);
+
+ if(isset($setting['SettingRegex'])
+ && !preg_match("/".$setting['SettingRegex']."/", $postinput[$setting_id]))
+ $temp_errstr = sprintf($app->lng('error_inv_value_for'), $setting['setting_name']);
+ }
+ else if($setting['SettingType'] == 'email')
+ {
+ if(filter_var(strtolower($postinput[$setting_id]), FILTER_VALIDATE_EMAIL) === false)
+ $temp_errstr = sprintf($app->lng('error_inv_email_for'), $setting['setting_name']);
+ }
+ else if($setting['SettingType'] == 'domain-name')
+ {
+ if(!preg_match("^(http|https)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&%\$#\=~_\-]+))*$",
+ $postinput[$setting_id]))
+ $temp_errstr = sprintf($app->lng('error_inv_domain_for'), $setting['setting_name']);
+ }
+ else if($setting['SettingType'] == 'integer')
+ {
+ if(filter_var($postinput[$setting_id], FILTER_VALIDATE_INT) === false)
+ $temp_errstr = sprintf($app->lng('error_inv_integer_for'), $setting['setting_name']);
+ }
+ else if($setting['SettingType'] == 'float')
+ {
+ if(filter_var($postinput[$setting_id], FILTER_VALIDATE_FLOAT) === false)
+ $temp_errstr = sprintf($app->lng('error_inv_float_for'), $setting['setting_name']);
+ }
+ else if($setting['SettingType'] == 'boolean')
+ {
+ // If we have a boolean value set, it must be either true or false
+ if(!isset($postinput[$setting_id])) $postinput[$setting_id] = 'false';
+ else if(isset($postinput[$setting_id]) && $postinput[$setting_id] != 'true')
+ $postinput[$setting_id] = 'true';
+ }
+ else if($setting['SettingType'] == 'enum')
+ {
+ $found = false;
+ for($i = 0; $i < count($setting['SettingChoices']); $i++)
+ {
+ if($setting['SettingChoices'][$i]['EnumID'] == $postinput[$setting_id])
+ $found = true;
+ }
+ if(!$found) $temp_errstr = sprintf($app->lng('error_inv_value_for'), $setting['SettingName']);
+ }
+
+ if($temp_errstr == '') $input[$setting_id] = $postinput[$setting_id];
+ else $error[] = $temp_errstr;
+ }
+ else $error[] = sprintf($app->lng('error_no_value_for'), $setting['SettingName']);
+ }
+
+ $ret['input'] = $input;
+ $ret['error'] = array_unique($error);
+
+ return $ret;
+ }
+
+ /**
+ * Read the metadata of a package and returns some content
+ *
+ * @param $id the internal ID of the package
+ * @return array
+ */
+ public function getPackageDetails($id)
+ {
+ global $app;
+
+ $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($id).';');
+
+ // Load in meta file if existing and register its namespaces
+ $metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml';
+ if(!file_exists($metafile))
+ return array('error' => 'The metafile for '.$pkg['name'].' couldn\'t be found');
+
+ $metadata = file_get_contents($metafile);
+ $metadata = str_replace("xmlns=", "ns=", $metadata);
+ $sxe = new SimpleXMLElement($metadata);
+ $namespaces = $sxe->getDocNamespaces(true);
+ foreach($namespaces as $ns => $url) $sxe->registerXPathNamespace($ns, $url);
+
+ $pkg['Summary'] = htmlspecialchars(parent::getXPathValue($sxe, '//summary'));
+ $pkg['Homepage'] = parent::getXPathValue($sxe, '//homepage');
+ $pkg['Description'] = nl2br(htmlspecialchars(trim(parent::getXPathValue($sxe, '//description'))));
+ $pkg['Config script'] = strtoupper(parent::getXPathValue($sxe, '//configuration-script-language'));
+ $installed_size = parent::getXPathValue($sxe, '//installed-size');
+ $pkg['Installed Size'] = (!empty($installed_size)) ? parent::convertSize((int)$installed_size) : '';
+
+ // License
+ $pkg['License need agree'] = parent::getXPathValue($sxe, '//license/@must-accept');
+ $pkg['License name'] = parent::getXPathValue($sxe, '//license/text/name'); // might be empty
+ $pkg['License type'] = 'file'; // default type
+ $pkg['License content'] = ''; // default license filename on local system
+ $license_url = parent::getXPathValue($sxe, '//license/text/url');
+ if(!empty($license_url))
+ {
+ $pkg['License type'] = 'url';
+ $pkg['License content'] = htmlspecialchars($license_url);
+ }
+ else
+ {
+ $lic = @file_get_contents($this->interface_pkg_dir.'/'.$pkg['path'].'/LICENSE');
+ $pkg['License content'] = htmlentities($lic, ENT_QUOTES, 'ISO-8859-1');
+ }
+
+ // Languages
+ $languages = parent::getXPathValue($sxe, '//languages/language', true);
+ $pkg['Languages'] = (is_array($languages)) ? implode(' ', $languages) : '';
+
+ // Icon
+ $icon = parent::getXPathValue($sxe, '//icon/@path');
+ if(!empty($icon))
+ {
+ // Using parse_url() to filter malformed URLs
+ $path = dirname(parse_url($_SERVER['PHP_SELF'], PHP_URL_PATH)).'/'.
+ basename($this->interface_pkg_dir).'/'.$pkg['path'].'/'.basename((string)$icon);
+ // nginx: if $_SERVER['PHP_SELF'] is doubled, remove /sites/aps_packagedetails_show.php from beginning of path
+ $path = preg_replace('@^/sites/aps_packagedetails_show.php(.*)@', '$1', $path);
+
+ $pkg['Icon'] = $path;
+ }
+ else $pkg['Icon'] = '';
+
+ // Screenshots
+ $screenshots = parent::getXPathValue($sxe, '//screenshot', true);
+ if(!empty($screenshots))
+ {
+ foreach($screenshots as $screen)
+ {
+ // Using parse_url() to filter malformed URLs
+ $path = dirname(parse_url($_SERVER['PHP_SELF'], PHP_URL_PATH)).'/'.
+ basename($this->interface_pkg_dir).'/'.$pkg['path'].'/'.basename((string)$screen['path']);
+ // nginx: if $_SERVER['PHP_SELF'] is doubled, remove /sites/aps_packagedetails_show.php from beginning of path
+ $path = preg_replace('@^/sites/aps_packagedetails_show.php(.*)@', '$1', $path);
+
+ $pkg['Screenshots'][] = array('ScreenPath' => $path,
+ 'ScreenDescription' => htmlspecialchars(trim((string)$screen->description)));
+ }
+ }
+ else $pkg['Screenshots'] = ''; // if no screenshots are available, set the variable though
+
+ // Changelog
+ $changelog = parent::getXPathValue($sxe, '//changelog/version', true);
+ if(!empty($changelog))
+ {
+ foreach($changelog as $change)
+ {
+ $entries = array();
+ foreach($change->entry as $entry) $entries[] = htmlspecialchars(trim((string)$entry));
+
+ $pkg['Changelog'][] = array('ChangelogVersion' => (string)$change['version'],
+ 'ChangelogDescription' => implode('
', $entries));
+ }
+ }
+
+ else $pkg['Changelog'] = '';
+
+ // PHP extensions
+ $php_extensions = parent::getXPathValue($sxe, '//php:extension', true);
+ $php_ext = '';
+ if(!empty($php_extensions))
+ {
+ foreach($php_extensions as $extension)
+ {
+ if(strtolower($extension) == 'php') continue;
+ $php_ext .= $extension.' ';
+ }
+ }
+ $pkg['Requirements PHP extensions'] = trim($php_ext);
+
+ // PHP bool options
+ $pkg['Requirements PHP settings'] = '';
+ $php_bool_options = array('allow-url-fopen', 'file-uploads', 'magic-quotes-gpc',
+ 'register-globals', 'safe-mode', 'short-open-tag');
+ foreach($php_bool_options as $option)
+ {
+ $value = parent::getXPathValue($sxe, '//php:'.$option);
+ if(!empty($value))
+ {
+ $option = str_replace('-', '_', $option);
+ $value = str_replace(array('false', 'true'), array('off', 'on'), $value);
+ $pkg['Requirements PHP settings'][] = array('PHPSettingName' => $option,
+ 'PHPSettingValue' => $value);
+ }
+ }
+
+ // PHP integer value settings
+ $memory_limit = parent::getXPathValue($sxe, '//php:memory-limit');
+ if(!empty($memory_limit))
+ $pkg['Requirements PHP settings'][] = array('PHPSettingName' => 'memory_limit',
+ 'PHPSettingValue' => parent::convertSize((int)$memory_limit));
+
+ $max_exec_time = parent::getXPathValue($sxe, '//php:max-execution-time');
+ if(!empty($max_exec_time))
+ $pkg['Requirements PHP settings'][] = array('PHPSettingName' => 'max-execution-time',
+ 'PHPSettingValue' => $max_exec_time);
+
+ $post_max_size = parent::getXPathValue($sxe, '//php:post-max-size');
+ if(!empty($post_max_size))
+ $pkg['Requirements PHP settings'][] = array('PHPSettingName' => 'post_max_size',
+ 'PHPSettingValue' => parent::convertSize((int)$post_max_size));
+
+ // Get supported PHP versions
+ $pkg['Requirements Supported PHP versions'] = '';
+ $php_min_version = parent::getXPathValue($sxe, '//php:version/@min');
+ $php_max_not_including = parent::getXPathValue($sxe, '//php:version/@max-not-including');
+ if(!empty($php_min_version) && !empty($php_max_not_including))
+ $pkg['Requirements Supported PHP versions'] = $php_min_version.' - '.$php_max_not_including;
+ else if(!empty($php_min_version))
+ $pkg['Requirements Supported PHP versions'] = '> '.$php_min_version;
+ else if(!empty($php_max_not_including))
+ $pkg['Requirements Supported PHP versions'] = '< '.$php_min_version;
+
+ // Database
+ $db_id = parent::getXPathValue($sxe, '//db:id');
+ $db_server_type = parent::getXPathValue($sxe, '//db:server-type');
+ $db_min_version = parent::getXPathValue($sxe, '//db:server-min-version');
+ if(!empty($db_id))
+ {
+ $db_server_type = str_replace('postgresql', 'PostgreSQL', $db_server_type);
+ $db_server_type = str_replace('microsoft:sqlserver', 'MSSQL', $db_server_type);
+ $db_server_type = str_replace('mysql', 'MySQL', $db_server_type);
+
+ $pkg['Requirements Database'] = $db_server_type;
+ if(!empty($db_min_version)) $pkg['Requirements Database'] .= ' > '.$db_min_version;
+ }
+ else $pkg['Requirements Database'] = '';
+
+ return $pkg;
+ }
+}
+?>
diff --git a/interface/lib/classes/client_templates.inc.php b/interface/lib/classes/client_templates.inc.php
index c2ef0bb0ec3c46a0cffa9e8d3ddd11619aac31bf..cdd9ea952ba25ab5291c19c1ea1ea4b428675d29 100644
--- a/interface/lib/classes/client_templates.inc.php
+++ b/interface/lib/classes/client_templates.inc.php
@@ -9,7 +9,94 @@
class client_templates {
- function apply_client_templates($clientId) {
+ /**
+ * - check for old-style templates and change to new style
+ * - update assigned templates
+ */
+ function update_client_templates($clientId, $templates = array()) {
+ global $app, $conf;
+
+ if(!is_array($templates)) return false;
+
+ $new_tpl = array();
+ $used_assigned = array();
+ $needed_types = array();
+ $old_style = true;
+ foreach($templates as $item) {
+ $item = trim($item);
+ if($item == '') continue;
+
+ $tpl_id = 0;
+ $assigned_id = 0;
+ if(strpos($item, ':') === false) {
+ $tpl_id = $item;
+ } else {
+ $old_style = false; // has new-style assigns
+ list($assigned_id, $tpl_id) = explode(':', $item, 2);
+ if(substr($assigned_id, 0, 1) === 'n') $assigned_id = 0; // newly inserted items
+ }
+ if(array_key_exists($tpl_id, $needed_types) == false) $needed_types[$tpl_id] = 0;
+ $needed_types[$tpl_id]++;
+
+ if($assigned_id > 0) {
+ $used_assigned[] = $assigned_id; // for comparison with database
+ } else {
+ $new_tpl[] = $tpl_id;
+ }
+ }
+
+ if($old_style == true) {
+ // we have to take care of this in an other way
+ $in_db = $app->db->queryAllRecords('SELECT `assigned_template_id`, `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ' . $clientId);
+ if(is_array($in_db) && count($in_db) > 0) {
+ foreach($in_db as $item) {
+ if(array_key_exists($item['client_template_id'], $needed_types) == false) $needed_types[$item['client_template_id']] = 0;
+ $needed_types[$item['client_template_id']]--;
+ }
+ }
+
+ foreach($needed_types as $tpl_id => $count) {
+ if($count > 0) {
+ // add new template to client (includes those from old-style without assigned_template_id)
+ for($i = $count; $i > 0; $i--) {
+ $app->db->query('INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (' . $clientId . ', ' . $tpl_id . ')');
+ }
+ } elseif($count < 0) {
+ // remove old ones
+ for($i = $count; $i < 0; $i++) {
+ $app->db->query('DELETE FROM `client_template_assigned` WHERE client_id = ' . $clientId . ' AND client_template_id = ' . $tpl_id . ' LIMIT 1');
+ }
+ }
+ }
+ } else {
+ // we have to take care of this in an other way
+ $in_db = $app->db->queryAllRecords('SELECT `assigned_template_id`, `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ' . $clientId);
+ if(is_array($in_db) && count($in_db) > 0) {
+ // check which templates were removed from this client
+ foreach($in_db as $item) {
+ if(in_array($item['assigned_template_id'], $used_assigned) == false) {
+ // delete this one
+ $app->db->query('DELETE FROM `client_template_assigned` WHERE `assigned_template_id` = ' . $item['assigned_template_id']);
+ }
+ }
+ }
+
+ if(count($new_tpl) > 0) {
+ foreach($new_tpl as $item) {
+ // add new template to client (includes those from old-style without assigned_template_id)
+ $app->db->query('INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (' . $clientId . ', ' . $item . ')');
+ }
+ }
+ }
+
+ unset($new_tpl);
+ unset($in_db);
+ unset($templates);
+ unset($used_assigned);
+ return true;
+ }
+
+ function apply_client_templates($clientId) {
global $app;
include('../client/form/client.tform.php');
@@ -20,8 +107,14 @@ class client_templates {
$sql = "SELECT template_master, template_additional FROM client WHERE client_id = " . $app->functions->intval($clientId);
$record = $app->db->queryOneRecord($sql);
$masterTemplateId = $record['template_master'];
- $additionalTemplateStr = $record['template_additional'];
-
+
+ if($record['template_additional'] != '') {
+ // we have to call the update_client_templates function
+ $templates = explode('/', $record['template_additional']);
+ $this->update_client_templates($clientId, $templates);
+ $app->db->query('UPDATE `client` SET `template_additional` = \'\' WHERE `client_id` = ' . $app->functions->intval($clientId));
+ }
+
/*
* if the master-Template is custom there is NO changing
*/
@@ -40,82 +133,82 @@ class client_templates {
* if != -1)
*/
$addTpl = explode('/', $additionalTemplateStr);
- foreach ($addTpl as $item){
- if (trim($item) != ''){
- $sql = "SELECT * FROM client_template WHERE template_id = " . $app->functions->intval($item);
- $addLimits = $app->db->queryOneRecord($sql);
- $app->log('Template processing subtemplate ' . $item . ' for client ' . $clientId, LOGLEVEL_DEBUG);
- /* maybe the template is deleted in the meantime */
- if (is_array($addLimits)){
- foreach($addLimits as $k => $v){
- /* we can remove this condition, but it is easier to debug with it (don't add ids and other non-limit values) */
- if (strpos($k, 'limit') !== false or $k == 'ssh_chroot' or $k == 'web_php_options' or $k == 'force_suexec'){
- $app->log('Template processing key ' . $k . ' for client ' . $clientId, LOGLEVEL_DEBUG);
+ $addTpls = $app->db->queryAllRecords('SELECT `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ' . $app->functions->intval($clientId));
+ foreach ($addTpls as $addTpl){
+ $item = $addTpl['client_template_id'];
+ $sql = "SELECT * FROM client_template WHERE template_id = " . $app->functions->intval($item);
+ $addLimits = $app->db->queryOneRecord($sql);
+ $app->log('Template processing subtemplate ' . $item . ' for client ' . $clientId, LOGLEVEL_DEBUG);
+ /* maybe the template is deleted in the meantime */
+ if (is_array($addLimits)){
+ foreach($addLimits as $k => $v){
+ /* we can remove this condition, but it is easier to debug with it (don't add ids and other non-limit values) */
+ if (strpos($k, 'limit') !== false or $k == 'ssh_chroot' or $k == 'web_php_options' or $k == 'force_suexec'){
+ $app->log('Template processing key ' . $k . ' for client ' . $clientId, LOGLEVEL_DEBUG);
- /* process the numerical limits */
- if (is_numeric($v)){
- /* switch for special cases */
- switch ($k){
- case 'limit_cron_frequency':
- if ($v < $limits[$k]) $limits[$k] = $v;
- /* silent adjustment of the minimum cron frequency to 1 minute */
- /* maybe this control test should be done via validator definition in tform.php file, but I don't know how */
- if ($limits[$k] < 1) $limits[$k] = 1;
- break;
+ /* process the numerical limits */
+ if (is_numeric($v)){
+ /* switch for special cases */
+ switch ($k){
+ case 'limit_cron_frequency':
+ if ($v < $limits[$k]) $limits[$k] = $v;
+ /* silent adjustment of the minimum cron frequency to 1 minute */
+ /* maybe this control test should be done via validator definition in tform.php file, but I don't know how */
+ if ($limits[$k] < 1) $limits[$k] = 1;
+ break;
- default:
- if ($limits[$k] > -1){
- if ($v == -1){
- $limits[$k] = -1;
- }
- else {
- $limits[$k] += $v;
- }
+ default:
+ if ($limits[$k] > -1){
+ if ($v == -1){
+ $limits[$k] = -1;
+ }
+ else {
+ $limits[$k] += $v;
}
}
}
- /* process the string limits (CHECKBOXARRAY, SELECT etc.) */
- elseif (is_string($v)){
- switch ($form["tabs"]["limits"]["fields"][$k]['formtype']){
- case 'CHECKBOXARRAY':
- if (!isset($limits[$k])){
- $limits[$k] = array();
- }
+ }
+ /* process the string limits (CHECKBOXARRAY, SELECT etc.) */
+ elseif (is_string($v)){
+ switch ($form["tabs"]["limits"]["fields"][$k]['formtype']){
+ case 'CHECKBOXARRAY':
+ if (!isset($limits[$k])){
+ $limits[$k] = array();
+ }
- $limits_values = $limits[$k];
- if (is_string($limits[$k])){
- $limits_values = explode($form["tabs"]["limits"]["fields"][$k]["separator"],$limits[$k]);
- }
- $additional_values = explode($form["tabs"]["limits"]["fields"][$k]["separator"],$v);
- $app->log('Template processing key ' . $k . ' type CHECKBOXARRAY, lim / add: ' . implode(',', $limits_values) . ' / ' . implode(',', $additional_values) . ' for client ' . $clientId, LOGLEVEL_DEBUG);
- /* unification of limits_values (master template) and additional_values (additional template) */
- $limits_unified = array();
- foreach($form["tabs"]["limits"]["fields"][$k]["value"] as $key => $val){
- if (in_array($key,$limits_values) || in_array($key,$additional_values)) $limits_unified[] = $key;
+ $limits_values = $limits[$k];
+ if (is_string($limits[$k])){
+ $limits_values = explode($form["tabs"]["limits"]["fields"][$k]["separator"],$limits[$k]);
+ }
+ $additional_values = explode($form["tabs"]["limits"]["fields"][$k]["separator"],$v);
+ $app->log('Template processing key ' . $k . ' type CHECKBOXARRAY, lim / add: ' . implode(',', $limits_values) . ' / ' . implode(',', $additional_values) . ' for client ' . $clientId, LOGLEVEL_DEBUG);
+ /* unification of limits_values (master template) and additional_values (additional template) */
+ $limits_unified = array();
+ foreach($form["tabs"]["limits"]["fields"][$k]["value"] as $key => $val){
+ if (in_array($key,$limits_values) || in_array($key,$additional_values)) $limits_unified[] = $key;
+ }
+ $limits[$k] = implode($form["tabs"]["limits"]["fields"][$k]["separator"],$limits_unified);
+ break;
+ case 'CHECKBOX':
+ if($k == 'force_suexec') {
+ // 'n' is less limited than y
+ if (!isset($limits[$k])){
+ $limits[$k] = 'y';
}
- $limits[$k] = implode($form["tabs"]["limits"]["fields"][$k]["separator"],$limits_unified);
- break;
- case 'CHECKBOX':
- if($k == 'force_suexec') {
- // 'n' is less limited than y
- if (!isset($limits[$k])){
- $limits[$k] = 'y';
- }
- if($limits[$k] == 'n' || $v == 'n') $limits[$k] = 'n';
- } else {
- // 'y' is less limited than n
- if (!isset($limits[$k])){
- $limits[$k] = 'n';
- }
- if($limits[$k] == 'y' || $v == 'y') $limits[$k] = 'y';
+ if($limits[$k] == 'n' || $v == 'n') $limits[$k] = 'n';
+ } else {
+ // 'y' is less limited than n
+ if (!isset($limits[$k])){
+ $limits[$k] = 'n';
}
- break;
- case 'SELECT':
- $limit_values = array_keys($form["tabs"]["limits"]["fields"][$k]["value"]);
- /* choose the lower index of the two SELECT items */
- $limits[$k] = $limit_values[min(array_search($limits[$k], $limit_values), array_search($v, $limit_values))];
- break;
+ if($limits[$k] == 'y' || $v == 'y') $limits[$k] = 'y';
}
+ break;
+ case 'SELECT':
+ $limit_values = array_keys($form["tabs"]["limits"]["fields"][$k]["value"]);
+ /* choose the lower index of the two SELECT items */
+ $limits[$k] = $limit_values[min(array_search($limits[$k], $limit_values), array_search($v, $limit_values))];
+ break;
}
}
}
diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php
index b3a59e930dcaa6f30bccde513c94fe1b1ab8aafa..197c406483ba9e01423b09a0a70a32062a803d27 100644
--- a/interface/lib/classes/listform.inc.php
+++ b/interface/lib/classes/listform.inc.php
@@ -193,11 +193,15 @@ class listform {
public function getPagingSQL($sql_where = '1')
{
global $app, $conf;
-
- //* Add Global Limit from selectbox
- if(!empty($_POST['search_limit']) AND $app->functions->intval($_POST['search_limit'])){
+
+ //* Add Global Limit from selectbox
+ if(!empty($_POST['search_limit']) AND $app->functions->intval($_POST['search_limit']) > 0){
$_SESSION['search']['limit'] = $app->functions->intval($_POST['search_limit']);
}
+
+ if(preg_match('{^[0-9]$}',$_SESSION['search']['limit'])){
+ $_SESSION['search']['limit'] = 15;
+ }
//* Get Config variables
$list_name = $this->listDef['name'];
diff --git a/interface/lib/classes/plugin_backuplist.inc.php b/interface/lib/classes/plugin_backuplist.inc.php
index ad567b29ed4c8f35e7d8ce8e42602d0d885308aa..2e0fdc5d3baf78707770406a7d564358bd3efa18 100644
--- a/interface/lib/classes/plugin_backuplist.inc.php
+++ b/interface/lib/classes/plugin_backuplist.inc.php
@@ -55,6 +55,12 @@ class plugin_backuplist extends plugin_base {
if(isset($_GET['backup_action'])) {
$backup_id = $app->functions->intval($_GET['backup_id']);
+ //* check if the user is owner of the parent domain
+ $domain_backup = $app->db->queryOneRecord("SELECT parent_domain_id FROM web_backup WHERE backup_id = ".$backup_id);
+ if(!$app->tform->checkOwnerPermisssions($this->dataRecord["parent_domain_id"])){
+ $app->error($app->tform->lng('no_domain_perm'));
+ }
+
if($_GET['backup_action'] == 'download' && $backup_id > 0) {
$sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_download' AND action_param = '$backup_id'";
$tmp = $app->db->queryOneRecord($sql);
diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index 66ba90dbf124ed9983f7ad8b6f374cc38a8afad2..55759f4bcea49cb6790c7beb966513ede96c36bd 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -1103,7 +1103,40 @@ class remoting {
}
$app->uses('remoting_lib');
$app->remoting_lib->loadFormDef('../client/form/client.tform.php');
- return $app->remoting_lib->getDataRecord($client_id);
+ $data = $app->remoting_lib->getDataRecord($client_id);
+
+ // we need to get the new-style templates for backwards-compatibility - maybe we remove this in a later version
+ if(is_array($data) && count($data) > 0) {
+ if(isset($data['client_id'])) {
+ // this is a single record
+ if($data['template_additional'] == '') {
+ $tpls = $app->db->queryAllRecords('SELECT CONCAT(`assigned_template_id`, \':\', `client_template_id`) as `item` FROM `client_template_assigned` WHERE `client_id` = ' . $data['client_id']);
+ $tpl_arr = array();
+ if($tpls) {
+ foreach($tpls as $tpl) $tpl_arr[] = $tpl['item'];
+ }
+ $data['template_additional'] = implode('/', $tpl_arr);
+ unset($tpl_arr);
+ unset($tpls);
+ }
+ } elseif(isset($data[0]['client_id'])) {
+ // multiple client records
+ foreach($data as $index => $client) {
+ if($client['template_additional'] == '') {
+ $tpls = $app->db->queryAllRecords('SELECT CONCAT(`assigned_template_id`, \':\', `client_template_id`) as `item` FROM `client_template_assigned` WHERE `client_id` = ' . $client['client_id']);
+ $tpl_arr = array();
+ if($tpls) {
+ foreach($tpls as $tpl) $tpl_arr[] = $tpl['item'];
+ }
+ $data[$index]['template_additional'] = implode('/', $tpl_arr); // dont use the $client array here - changes would not be returned to soap
+ }
+ unset($tpl_arr);
+ unset($tpls);
+ }
+ }
+ }
+
+ return $data;
}
public function client_get_id($session_id, $sys_userid)
@@ -1169,6 +1202,33 @@ class remoting {
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
return false;
}
+
+ $app->uses('remoting_lib');
+ $app->remoting_lib->loadFormDef('../client/form/' . (isset($params['limit_client']) && $params['limit_client'] > 0 ? 'reseller' : 'client') . '.tform.php');
+ $old_rec = $app->remoting_lib->getDataRecord($client_id);
+
+ // we need the previuos templates assigned here
+ $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ' . $client_id);
+ if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) {
+ // check previous type of storing templates
+ $tpls = explode('/', $old_rec['template_additional']);
+ $this->oldTemplatesAssigned = array();
+ foreach($tpls as $item) {
+ $item = trim($item);
+ if(!$item) continue;
+ $this->oldTemplatesAssigned[] = array('assigned_template_id' => 0, 'client_template_id' => $item, 'client_id' => $client_id);
+ }
+ unset($tpls);
+ }
+ if(isset($params['template_additional'])) {
+ $app->uses('client_templates');
+ $templates = explode('/', $params['template_additional']);
+ $params['template_additional'] = '';
+ $app->client_templates->update_client_templates($client_id, $templates);
+ unset($templates);
+ }
+
+
if(!isset($params['parent_client_id']) || $params['parent_client_id'] == 0) $params['parent_client_id'] = $reseller_id;
$affected_rows = $this->updateQuery('../client/form/' . (isset($params['limit_client']) && $params['limit_client'] > 0 ? 'reseller' : 'client') . '.tform.php', $reseller_id, $client_id, $params, 'client:' . ($reseller_id ? 'reseller' : 'client') . ':on_after_update');
@@ -1176,7 +1236,120 @@ class remoting {
return $affected_rows;
}
+
+ public function client_template_additional_get($session_id, $client_id) {
+ global $app;
+ if(!$this->checkPerm($session_id, 'client_get')) {
+ $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
+ return false;
+ }
+
+ if(@is_numeric($client_id)) {
+ $sql = "SELECT * FROM `client_template_assigned` WHERE `client_id` = ".$client_id;
+ return $app->db->queryOneRecord($sql);
+ } else {
+ $this->server->fault('The ID must be an integer.');
+ return array();
+ }
+ }
+
+ private function _set_client_formdata($client_id) {
+ global $app;
+
+ $this->id = $client_id;
+ $this->dataRecord = $app->db->queryOneRecord('SELECT * FROM `client` WHERE `client_id` = ' . $client_id);
+ $this->oldDataRecord = $this->dataRecord;
+
+ $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ' . $client_id);
+ if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) {
+ // check previous type of storing templates
+ $tpls = explode('/', $this->oldDataRecord['template_additional']);
+ $this->oldTemplatesAssigned = array();
+ foreach($tpls as $item) {
+ $item = trim($item);
+ if(!$item) continue;
+ $this->oldTemplatesAssigned[] = array('assigned_template_id' => 0, 'client_template_id' => $item, 'client_id' => $client_id);
+ }
+ unset($tpls);
+ }
+ }
+
+ public function client_template_additional_add($session_id, $client_id, $template_id) {
+ global $app;
+
+ if(!$this->checkPerm($session_id, 'client_update')) {
+ $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
+ return false;
+ }
+
+ if(@is_numeric($client_id) && @is_numeric($template_id)) {
+ // check if client exists
+ $check = $app->db->queryOneRecord('SELECT `client_id` FROM `client` WHERE `client_id` = ' . $client_id);
+ if(!$check) {
+ $this->server->fault('Invalid client');
+ return false;
+ }
+ // check if template exists
+ $check = $app->db->queryOneRecord('SELECT `template_id` FROM `client_template` WHERE `template_id` = ' . $template_id);
+ if(!$check) {
+ $this->server->fault('Invalid template');
+ return false;
+ }
+
+ // for the update event we have to cheat a bit
+ $this->_set_client_formdata($client_id);
+
+ $sql = "INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (" . $client_id . ", " . $template_id . ")";
+ $app->db->query($sql);
+ $insert_id = $app->db->insertID();
+
+ $app->plugin->raiseEvent('client:client:on_after_update',$this);
+
+ return $insert_id;
+ } else {
+ $this->server->fault('The IDs must be of type integer.');
+ return false;
+ }
+ }
+
+ public function client_template_additional_delete($session_id, $client_id, $assigned_template_id) {
+ global $app;
+
+ if(!$this->checkPerm($session_id, 'client_update')) {
+ $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
+ return false;
+ }
+
+ if(@is_numeric($client_id) && @is_numeric($template_id)) {
+ // check if client exists
+ $check = $app->db->queryOneRecord('SELECT `client_id` FROM `client` WHERE `client_id` = ' . $client_id);
+ if(!$check) {
+ $this->server->fault('Invalid client');
+ return false;
+ }
+ // check if template exists
+ $check = $app->db->queryOneRecord('SELECT `assigned_template_id` FROM `client_template_assigned` WHERE `assigned_template_id` = ' . $assigned_template_id);
+ if(!$check) {
+ $this->server->fault('Invalid template');
+ return false;
+ }
+
+ // for the update event we have to cheat a bit
+ $this->_set_client_formdata($client_id);
+
+ $sql = "DELETE FROM `client_template_assigned` WHERE `assigned_template_id` = " . $template_id . " AND `client_id` = " . $client_id;
+ $app->db->query($sql);
+ $affected_rows = $app->db->affectedRows();
+
+ $app->plugin->raiseEvent('client:client:on_after_update',$this);
+
+ return $affected_rows;
+ } else {
+ $this->server->fault('The IDs must be of type integer.');
+ return false;
+ }
+ }
public function client_delete($session_id,$client_id)
{
diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index f9cf59d37c2c530bce252560ee4cced87c2f8c94..0c40a8626265db2f9f2cec2bdcffa65099d1d6fc 100644
--- a/interface/lib/classes/remoting_lib.inc.php
+++ b/interface/lib/classes/remoting_lib.inc.php
@@ -133,6 +133,8 @@ class remoting_lib {
}
}
unset($form);
+
+ $this->dateformat = $app->lng('conf_format_dateshort');
return true;
}
diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php
index d1fd373c5c119c2bccd0888590419116b35b6fe2..f4ea0d7de138876990e56abd9abf1b572d56160b 100644
--- a/interface/lib/classes/tform.inc.php
+++ b/interface/lib/classes/tform.inc.php
@@ -552,9 +552,10 @@ class tform {
$new_record[$key] = $out;
break;
- case 'PASSWORD':
- $new_record[$key] = '';
- break;
+ case 'PASSWORD':
+ //$new_record[$key] = '';
+ $new_record[$key] = htmlspecialchars($field['default']);
+ break;
case 'CHECKBOX':
// $checked = (empty($field["default"]))?'':' CHECKED';
@@ -1257,7 +1258,7 @@ class tform {
function getDataRecord($primary_id) {
global $app;
$escape = '`';
- $sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id;
+ $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);
}
@@ -1267,7 +1268,7 @@ class tform {
$app->db->datalogSave($this->formDef['db_table'], $action, $this->formDef['db_table_idx'], $primary_id, $record_old, $record_new);
return true;
-
+<<<<<<< .mine
/*
// Add backticks for incomplete table names.
if(stristr($this->formDef['db_table'],'.')) {
@@ -1331,7 +1332,7 @@ class tform {
return true;
*/
- }
+=======>>>>>>> .theirs }
function getAuthSQL($perm, $table = '') {
if($_SESSION["s"]["user"]["typ"] == 'admin') {
diff --git a/interface/lib/classes/tree.inc.php b/interface/lib/classes/tree.inc.php
index a2bdfd2b027eb36c259f62ade291cb59f58b66fb..dcc2d61fd2a9f303540ddde67f4edcdeab594023 100644
--- a/interface/lib/classes/tree.inc.php
+++ b/interface/lib/classes/tree.inc.php
@@ -147,14 +147,14 @@ class tree
function deltree($tree_id) {
// lösche Einträge recursiv
- $this->_deltree_recurse(&$this->obj[$this->root_id],$tree_id, 0);
+ $this->_deltree_recurse($this->obj[$this->root_id],$tree_id, 0);
}
/*
Hilfsfunktion für deltree
*/
- function _deltree_recurse($myobj,$tree_id,$delete) {
+ function _deltree_recurse(&$myobj,$tree_id,$delete) {
if(is_array($myobj->childs)) {
foreach($myobj->childs as $val) {
@@ -164,7 +164,7 @@ class tree
}
// recurse durch Objekte
- $this->_deltree_recurse(&$val,$tree_id,$delete);
+ $this->_deltree_recurse($val,$tree_id,$delete);
// lösche Eintrag
if($delete == 1) {
diff --git a/interface/lib/lang/ar.lng b/interface/lib/lang/ar.lng
index a49f6fb8547ab6ad6d240dba0d4c583275613f17..8bea2ecf890c3c9a7613d60171d20405ff5febd9 100644
--- a/interface/lib/lang/ar.lng
+++ b/interface/lib/lang/ar.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng
index 8b15a9a5067ab037e0a4a542dcf0619b3c7937a0..288701799c67778a7b810085e2a776e56bb69eaf 100644
--- a/interface/lib/lang/bg.lng
+++ b/interface/lib/lang/bg.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/br.lng b/interface/lib/lang/br.lng
index ae65e871db476dea6554438ff70c5b7808c78652..0caeef495c9d8b5d17a52f71cb8570ec7facdf3c 100644
--- a/interface/lib/lang/br.lng
+++ b/interface/lib/lang/br.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng
index 4bff9bc2e58239d2cdc0d97ed1239fd26fafa2ea..0c3071926c61674ce591a2a9c30a5a9da14277fd 100644
--- a/interface/lib/lang/cz.lng
+++ b/interface/lib/lang/cz.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_web_folder_user'] = 'Vytvoření uživatele pro adresáře
$wb['datalog_status_u_web_folder_user'] = 'Aktualizace nastavení uživatele pro adresáře chráněné heslem';
$wb['datalog_status_d_web_folder_user'] = 'Odstranění uživatele pro adresáře chráněné heslem';
$wb['login_as_txt'] = 'Přihlaste se jako';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng
index 56b1c1be8598dd7372e3de6f3af5355434432325..328b5202d4cda6028dcca965c02b8210194d42ef 100644
--- a/interface/lib/lang/de.lng
+++ b/interface/lib/lang/de.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_web_folder_user'] = 'Verzeichnisschutz Benutzer anlegen';
$wb['datalog_status_u_web_folder_user'] = 'Verzeichnisschutz Benutzer ändern';
$wb['datalog_status_d_web_folder_user'] = 'Verzeichnisschutz Benutzer löschen';
$wb['login_as_txt'] = 'Anmelden als';
+$wb['no_domain_perm'] = 'Sie haben keine Berechtigung für diese Domain.';
+$wb['no_destination_perm'] = 'Sie haben keine Berechtigung für dieses Ziel.';
?>
diff --git a/interface/lib/lang/el.lng b/interface/lib/lang/el.lng
index a85327db6f487f7a6bf853c69d40dc5f607a85f2..b633c1b86383e5b7ec214e03610471ba163caaf2 100644
--- a/interface/lib/lang/el.lng
+++ b/interface/lib/lang/el.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng
index 60e9bd30d14054f51dc58bfc7103c7e7ec9655b2..47b611586d55a4450e99b3bedeae87a8cebfbbcf 100644
--- a/interface/lib/lang/en.lng
+++ b/interface/lib/lang/en.lng
@@ -133,4 +133,6 @@ $wb['datalog_status_u_web_folder_user'] = 'Update folder protection user';
$wb['datalog_status_d_web_folder_user'] = 'Delete folder protection user';
$wb['login_as_txt'] = 'Log in as';
+$wb["no_domain_perm"] = 'You have no permission for this domain.';
+$wb["no_destination_perm"] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/es.lng b/interface/lib/lang/es.lng
index 619ae97f1f4fe0f37c56548fb384c798a03ffe17..8d79fb91be9f9565c89ca20f1d3f352853326721 100644
--- a/interface/lib/lang/es.lng
+++ b/interface/lib/lang/es.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_web_folder_user'] = 'Create folder protection user';
$wb['datalog_status_u_web_folder_user'] = 'Update folder protection user';
$wb['datalog_status_d_web_folder_user'] = 'Delete folder protection user';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/fi.lng b/interface/lib/lang/fi.lng
index 9b89ed1a6c7ddc2af7900f4f0d72ee8f72ab7f4a..01d89e23ce70e15a71fbb223a4345397c4957ae9 100755
--- a/interface/lib/lang/fi.lng
+++ b/interface/lib/lang/fi.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng
index c611a6a09ef13a26ddbc34c0b2125dbc50815de1..ff5f9ff55416b5c118d1192de7a08bdd052cfa79 100644
--- a/interface/lib/lang/fr.lng
+++ b/interface/lib/lang/fr.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_web_folder_user'] = 'Create folder protection user';
$wb['datalog_status_u_web_folder_user'] = 'Update folder protection user';
$wb['datalog_status_d_web_folder_user'] = 'Delete folder protection user';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/hr.lng b/interface/lib/lang/hr.lng
index 8ba16f1b627a5ce275faca155052f46823544051..903e7270814a61d31752c50937549b3a4300c4a6 100644
--- a/interface/lib/lang/hr.lng
+++ b/interface/lib/lang/hr.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/hu.lng b/interface/lib/lang/hu.lng
index 7ed92c5b7cd81d0a06c5ff14788adf76145629f1..da0302219b5ce949c58d93afe66433ac97bd5595 100644
--- a/interface/lib/lang/hu.lng
+++ b/interface/lib/lang/hu.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/id.lng b/interface/lib/lang/id.lng
index 6313b8fa4770c3d0273ee15f3130e14c3f23cc75..83383e0dd235aa954e84939cb28af9a3982c2bef 100644
--- a/interface/lib/lang/id.lng
+++ b/interface/lib/lang/id.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/it.lng b/interface/lib/lang/it.lng
index 4f05227b63787705d610e9655657849456a5b47a..a64b252cc96fab3215c67ce6034d393f18b08a7f 100644
--- a/interface/lib/lang/it.lng
+++ b/interface/lib/lang/it.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/ja.lng b/interface/lib/lang/ja.lng
index e8493692dcccbdddb727151880ec3789393c70cf..df33aa89458c1ace8715e79f04e5d88de4079cbd 100644
--- a/interface/lib/lang/ja.lng
+++ b/interface/lib/lang/ja.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/nl.lng b/interface/lib/lang/nl.lng
index d0d8d9e054f8e25334448204c486715bdd9b52ad..459de7fce0310351f97eb139784a6e3e7784fc73 100644
--- a/interface/lib/lang/nl.lng
+++ b/interface/lib/lang/nl.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/pl.lng b/interface/lib/lang/pl.lng
index 7374ab6b886db0c4d6df20ade178a69ea061b9bc..338366167d86df0a9b328048a9116e57dbe4259f 100644
--- a/interface/lib/lang/pl.lng
+++ b/interface/lib/lang/pl.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_web_folder_user'] = 'Utwórz konto dla zabezpieczonego fol
$wb['datalog_status_u_web_folder_user'] = 'Edytuj konto zabezpieczonego folderu';
$wb['datalog_status_d_web_folder_user'] = 'Usuń konto zabezpieczonego folderu';
$wb['login_as_txt'] = 'Zaloguj jako';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/pt.lng b/interface/lib/lang/pt.lng
index cb16283c220ea3ace5465c6a58f03980382c7bcd..bc4a99cdb06be9a7f2f1eeaf2c42cfd1d77ce674 100644
--- a/interface/lib/lang/pt.lng
+++ b/interface/lib/lang/pt.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/ro.lng b/interface/lib/lang/ro.lng
index c30a9b75b90d7bb8c1487a0c200b8618bb771d34..7c54cd2e699d4599d2e0b3f283a19d893d42fc16 100644
--- a/interface/lib/lang/ro.lng
+++ b/interface/lib/lang/ro.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/ru.lng b/interface/lib/lang/ru.lng
index 039622403a33477fc4b953a22888fc3f8b8111d0..07a8118116a7152f675172bb751f08d0b5fcd35e 100644
--- a/interface/lib/lang/ru.lng
+++ b/interface/lib/lang/ru.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/se.lng b/interface/lib/lang/se.lng
index 712e415a37ee6e235369ea43f9702726047bc98b..8334a1f419c84c4790715e3803b515b9ee6bfdbb 100644
--- a/interface/lib/lang/se.lng
+++ b/interface/lib/lang/se.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/sk.lng b/interface/lib/lang/sk.lng
index 15923d24643fd1b3ed951d7145eb56d74b884dcb..1c8781764fba10cbd74ffbc6ebe5dd8a070c0a79 100644
--- a/interface/lib/lang/sk.lng
+++ b/interface/lib/lang/sk.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/lib/lang/tr.lng b/interface/lib/lang/tr.lng
index 55041acb565bf4f1f965337ca51df77553dbb9a3..71225191a76852afa0afc5b7ab361f6df046719b 100644
--- a/interface/lib/lang/tr.lng
+++ b/interface/lib/lang/tr.lng
@@ -131,4 +131,6 @@ $wb['datalog_status_i_spamfilter_users'] = 'Create spam filter settings';
$wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
$wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
$wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
?>
diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index da67f6b0b3061b8b531eb18e3ed4e5862418150f..f09d4db2e1bf8f749c6972aacaae58416fa62c1b 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -433,6 +433,42 @@ $form["tabs"]['misc'] = array (
'default' => 'n',
'value' => array(0 => 'n',1 => 'y')
),
+ 'admin_dashlets_left' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => ''
+ ),
+ 'admin_dashlets_right' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => ''
+ ),
+ 'reseller_dashlets_left' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => ''
+ ),
+ 'reseller_dashlets_right' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => ''
+ ),
+ 'client_dashlets_left' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => ''
+ ),
+ 'client_dashlets_right' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => ''
+ ),
##################################
# ENDE Datatable fields
##################################
diff --git a/interface/web/admin/language_edit.php b/interface/web/admin/language_edit.php
index f16ea683cfa249553bf03e10d9a92cb622e3f655..208f1ac94f939609437864b7cb6834884fd7e651 100644
--- a/interface/web/admin/language_edit.php
+++ b/interface/web/admin/language_edit.php
@@ -85,7 +85,7 @@ $app->tpl->setVar("file_path", $file_path);
$keyword_list = array();
if(isset($wb) && is_array($wb)) {
foreach($wb as $key => $val) {
- $keyword_list[] = array('key' => $key, 'val' => $val);
+ $keyword_list[] = array('key' => $key, 'val' => htmlentities($val));
}
$app->tpl->setLoop('records', $keyword_list);
diff --git a/interface/web/admin/lib/lang/ar_server_config.lng b/interface/web/admin/lib/lang/ar_server_config.lng
index 618b69e47ace7f5ec9e069db39c55e5409eac2bd..1c21551a82bcaa7b066b1c885ee1a09d8892710b 100644
--- a/interface/web/admin/lib/lang/ar_server_config.lng
+++ b/interface/web/admin/lib/lang/ar_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/ar_software_package.lng b/interface/web/admin/lib/lang/ar_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/ar_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/ar_software_package_list.lng b/interface/web/admin/lib/lang/ar_software_package_list.lng
index 87b27fd50b16af5b4ffe42a716a33db748143e64..9fa53867bc70f653a4410da5dc70988beebfdcdb 100644
--- a/interface/web/admin/lib/lang/ar_software_package_list.lng
+++ b/interface/web/admin/lib/lang/ar_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/ar_software_repo.lng b/interface/web/admin/lib/lang/ar_software_repo.lng
index 574dd1162989badc8499f5af31451a43673bf4da..f2cbbb2c25776ab5f1794e7102ad264a98144049 100644
--- a/interface/web/admin/lib/lang/ar_software_repo.lng
+++ b/interface/web/admin/lib/lang/ar_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'User (optional)';
$wb['repo_password_txt'] = 'Password (optional)';
$wb['active_txt'] = 'Active';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/ar_system_config.lng b/interface/web/admin/lib/lang/ar_system_config.lng
index 1cc07ec02b5f652a86bb9e4fd2136b2db81260ce..11604d343015457843094003a694a3d57a898229 100644
--- a/interface/web/admin/lib/lang/ar_system_config.lng
+++ b/interface/web/admin/lib/lang/ar_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/bg_server_config.lng b/interface/web/admin/lib/lang/bg_server_config.lng
index 18cae752594c2128953766ba55afcac2beacdede..c050aad0298fea158f53c7824890f43b87b02f0f 100644
--- a/interface/web/admin/lib/lang/bg_server_config.lng
+++ b/interface/web/admin/lib/lang/bg_server_config.lng
@@ -171,4 +171,21 @@ $wb['website_autoalias_note_txt'] = 'Placeholders:';
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/bg_software_package.lng b/interface/web/admin/lib/lang/bg_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/bg_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/bg_software_package_list.lng b/interface/web/admin/lib/lang/bg_software_package_list.lng
index 6ff7b4a9aa8953a1808ad4bd5aabc23625a997e7..e251c95fbd2a3d9bd3f8d01e883e8111fd489813 100644
--- a/interface/web/admin/lib/lang/bg_software_package_list.lng
+++ b/interface/web/admin/lib/lang/bg_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Пакети';
$wb['repoupdate_txt'] = 'Обновяване на пакетите ';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/bg_software_repo.lng b/interface/web/admin/lib/lang/bg_software_repo.lng
index a69c741afd72d47d1c77b6ab5c96073aab754adc..f5156543451cdbd127b34dfed1798a2c6dc5c58c 100644
--- a/interface/web/admin/lib/lang/bg_software_repo.lng
+++ b/interface/web/admin/lib/lang/bg_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Потребител (не е задължително)';
$wb['repo_password_txt'] = 'Парола (не е задължително)';
$wb['active_txt'] = 'Активен';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/bg_system_config.lng b/interface/web/admin/lib/lang/bg_system_config.lng
index b7b364bf0270c8aa2f327654b42f1633ebadb5b3..e3c6678b15971400e73d6e388fc3e991e032a941 100644
--- a/interface/web/admin/lib/lang/bg_system_config.lng
+++ b/interface/web/admin/lib/lang/bg_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng
index 1f8e3f7622cfeb9029bd61a77a865e171902afa3..71288a9aa0fde1e4c73c53c542eb2a9dc549e56a 100644
--- a/interface/web/admin/lib/lang/br_server_config.lng
+++ b/interface/web/admin/lib/lang/br_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/br_software_package.lng b/interface/web/admin/lib/lang/br_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/br_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/br_software_package_list.lng b/interface/web/admin/lib/lang/br_software_package_list.lng
index 2adf5b8d4398805b173d3f2b0bbb75826a185bd2..fd4f41e6d05495997a03c2550f03ce7cd4549e97 100644
--- a/interface/web/admin/lib/lang/br_software_package_list.lng
+++ b/interface/web/admin/lib/lang/br_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/br_software_repo.lng b/interface/web/admin/lib/lang/br_software_repo.lng
index 5b54c3080a049d334f22d959cbb248462779963c..dc89937425e53e6dbeda054e66742fb815ee5723 100644
--- a/interface/web/admin/lib/lang/br_software_repo.lng
+++ b/interface/web/admin/lib/lang/br_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Usuário (opcional)';
$wb['repo_password_txt'] = 'Senha (opcional)';
$wb['active_txt'] = 'Ativo';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng
index 76d2c06ac8c4d2e38bac5ad674bcee6be7c237a4..3bc01721545f3775910f1a2d8f9f5527fad1bd4f 100644
--- a/interface/web/admin/lib/lang/br_system_config.lng
+++ b/interface/web/admin/lib/lang/br_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/cz_remote_action.lng b/interface/web/admin/lib/lang/cz_remote_action.lng
index 68da1c065db30c362e27992e58b5a53b755d6150..e1908e2d04fe0259ee7258ae0be1506dc6a7982c 100644
--- a/interface/web/admin/lib/lang/cz_remote_action.lng
+++ b/interface/web/admin/lib/lang/cz_remote_action.lng
@@ -2,9 +2,9 @@
$wb['select_server_txt'] = 'Zvolit server';
$wb['btn_do_txt'] = 'Provést akci';
$wb['do_osupdate_caption'] = 'Aktualizace operačního systému na vzdáleném serveru.';
-$wb['do_osupdate_desc'] = 'Tato akce provede \"aptitude -y\" aktualizaci na vybraném serveru.
POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !';
+$wb['do_osupdate_desc'] = 'Tato akce provede \\"aptitude -y\\" aktualizaci na vybraném serveru.
POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !';
$wb['do_ispcupdate_caption'] = 'Provedení ISPConfig 3 - aktualizace na vzdáleném serveru';
-$wb['do_ispcupdate_desc'] = 'Tato akce provede \"ISPConfig 3\" aktualizaci na vašem vybraném serveru.
POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !';
+$wb['do_ispcupdate_desc'] = 'Tato akce provede \\"ISPConfig 3\\" aktualizaci na vašem vybraném serveru.
POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !';
$wb['action_scheduled'] = 'Akce je naplánována na provedení';
$wb['select_all_server'] = 'Všechny servery';
$wb['ispconfig_update_title'] = 'ISPConfig pokyny k aktualizaci';
diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng
index c0e42402e34b3570234270a948234822bf2b4525..049da2272ee40996805314547d579a4e2faa92df 100644
--- a/interface/web/admin/lib/lang/cz_server_config.lng
+++ b/interface/web/admin/lib/lang/cz_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Při překročení limitu přenesených dat, poslat oznámení adminovi';
$wb['overtraffic_notify_client_txt'] = 'Při překročení limitu přenesených dat, poslat oznámení klientovi';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/cz_software_package.lng b/interface/web/admin/lib/lang/cz_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/cz_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/cz_software_package_list.lng b/interface/web/admin/lib/lang/cz_software_package_list.lng
index 7df837f0c1c11d61f8f9343fcde6d9f79fc3d14a..9d227acb2df30b0bd8f8021918c8d040e832a035 100644
--- a/interface/web/admin/lib/lang/cz_software_package_list.lng
+++ b/interface/web/admin/lib/lang/cz_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Balíčky';
$wb['repoupdate_txt'] = 'Aktualizace seznamu balíků';
$wb['package_id_txt'] = 'místní App-ID';
$wb['no_packages_txt'] = 'Žádné balíčky nejsou k dispozici';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/cz_software_repo.lng b/interface/web/admin/lib/lang/cz_software_repo.lng
index 64a190d9a1dddf174078dcdfcecb2f3f9c1cd34c..6e200d8d12f9a123559cdb80011746bc094feac7 100644
--- a/interface/web/admin/lib/lang/cz_software_repo.lng
+++ b/interface/web/admin/lib/lang/cz_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Uživatel (volitelné)';
$wb['repo_password_txt'] = 'Heslo (volitelné)';
$wb['active_txt'] = 'Aktivní';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng
index 8073830ebd6c500e70012ee2a4e60f9508c616c6..167b933328150fb5c0ba61d1eb18069d10091b1d 100644
--- a/interface/web/admin/lib/lang/cz_system_config.lng
+++ b/interface/web/admin/lib/lang/cz_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show Autoresponder tab in Mailbox detail';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show Mail Filter tab in Mailbox detail';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show Custom Rules tab in Mailbox detail';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng
index 163fa3479be01da0323ab7c8480d9941f27639e2..217b95de8bf3b545de5793d082ad95765bc411db 100644
--- a/interface/web/admin/lib/lang/de_system_config.lng
+++ b/interface/web/admin/lib/lang/de_system_config.lng
@@ -52,4 +52,11 @@ $wb['mailbox_show_custom_rules_tab_txt'] = 'Zeige Benutzerregel Reiter in E-Mail
$wb['reseller_can_use_options_txt'] = 'Reseller können den Optionen Reiter bei Webseiten verwenden';
$wb['phpmyadmin_url_note_txt'] = 'Platzhalter:';
$wb['webmail_url_note_txt'] = 'Platzhalter:';
+$wb['available_dashlets_note_txt'] = 'Verfügbare Dashlets:';
+$wb['admin_dashlets_left_txt'] = 'Admin-Dashlets links';
+$wb['admin_dashlets_right_txt'] = 'Admin-Dashlets rechts';
+$wb['reseller_dashlets_left_txt'] = 'Reseller-Dashlets links';
+$wb['reseller_dashlets_right_txt'] = 'Reseller-Dashlets rechts';
+$wb['client_dashlets_left_txt'] = 'Kunden-Dashlets links';
+$wb['client_dashlets_right_txt'] = 'Kunden-Dashlets rechts';
?>
diff --git a/interface/web/admin/lib/lang/el_server_config.lng b/interface/web/admin/lib/lang/el_server_config.lng
index b9913e65eee075ab3aa94cc87cb9b099eb1031c1..99bdf6f2d265b324ed3a9862261d5c3173c2f9bf 100644
--- a/interface/web/admin/lib/lang/el_server_config.lng
+++ b/interface/web/admin/lib/lang/el_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/el_software_package.lng b/interface/web/admin/lib/lang/el_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/el_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/el_software_package_list.lng b/interface/web/admin/lib/lang/el_software_package_list.lng
index 1528928da3ecb4914741e62bc61f25add409d41a..1553ea1ceafeca4b43be5bd163c9b3fc47ae9864 100644
--- a/interface/web/admin/lib/lang/el_software_package_list.lng
+++ b/interface/web/admin/lib/lang/el_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Πακέτα';
$wb['repoupdate_txt'] = 'Ενημέρωση λίστας πακκέτων';
$wb['package_id_txt'] = 'τοπικό App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/el_software_repo.lng b/interface/web/admin/lib/lang/el_software_repo.lng
index 5b1e2228edb0f53c8b6b86d7be3f7b0bfc808469..3b12d3fd874fd4e1945f6ce2f234e2f3d619ae24 100644
--- a/interface/web/admin/lib/lang/el_software_repo.lng
+++ b/interface/web/admin/lib/lang/el_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Χρήστης (Προαιρετικό)';
$wb['repo_password_txt'] = 'Συνθηματικό (Προαιρετικό)';
$wb['active_txt'] = 'Ενεργό';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/el_system_config.lng b/interface/web/admin/lib/lang/el_system_config.lng
index d85a0830c93e985f9dbc52adeda30709a700abc2..f69e58a83dcb36a0ddd19b895989dadb48465c45 100644
--- a/interface/web/admin/lib/lang/el_system_config.lng
+++ b/interface/web/admin/lib/lang/el_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng
index 2edd54307ee002d12c372314ca21ccd5cd335b14..7c5fe6eaf7231fa8656b66a69a8a082cf4b5f13c 100644
--- a/interface/web/admin/lib/lang/en_system_config.lng
+++ b/interface/web/admin/lib/lang/en_system_config.lng
@@ -55,4 +55,11 @@ $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail a
$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
$wb['webmail_url_note_txt'] = 'Placeholder:';
+$wb['available_dashlets_note_txt'] = 'Available Dashlets:';
+$wb['admin_dashlets_left_txt'] = 'Left Admin Dashlets';
+$wb['admin_dashlets_right_txt'] = 'Right Admin Dashlets';
+$wb['reseller_dashlets_left_txt'] = 'Left Reseller Dashlets';
+$wb['reseller_dashlets_right_txt'] = 'Right Reseller Dashlets';
+$wb['client_dashlets_left_txt'] = 'Left Client Dashlets';
+$wb['client_dashlets_right_txt'] = 'Right Client Dashlets';
?>
diff --git a/interface/web/admin/lib/lang/es_server_config.lng b/interface/web/admin/lib/lang/es_server_config.lng
index 92d9b45bd851e90a5436f8102938f9d6affc2f9f..1987c5145e729c2458d3db3ff8166b830e3a59a1 100644
--- a/interface/web/admin/lib/lang/es_server_config.lng
+++ b/interface/web/admin/lib/lang/es_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/es_software_package.lng b/interface/web/admin/lib/lang/es_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/es_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/es_software_package_list.lng b/interface/web/admin/lib/lang/es_software_package_list.lng
index 103260991e66858bec7bdcee76e639a44a465a1a..3986ef87056f0c9770762082cc47d44d54b1141a 100644
--- a/interface/web/admin/lib/lang/es_software_package_list.lng
+++ b/interface/web/admin/lib/lang/es_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/es_software_repo.lng b/interface/web/admin/lib/lang/es_software_repo.lng
index 3b9a89e88a233267935796debc6b78d7d55d9ea9..b8487cfbfa7703e3723c7d1db0b41b5ae2a05f17 100644
--- a/interface/web/admin/lib/lang/es_software_repo.lng
+++ b/interface/web/admin/lib/lang/es_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Usuario (opcional)';
$wb['repo_password_txt'] = 'Contraseña (opcional)';
$wb['active_txt'] = 'Activar';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/es_system_config.lng b/interface/web/admin/lib/lang/es_system_config.lng
index f4ed53ca4807066edb0548b1d98fb92d21dbbc74..118a0dfae82608926a6988378cb46671deee5716 100644
--- a/interface/web/admin/lib/lang/es_system_config.lng
+++ b/interface/web/admin/lib/lang/es_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/fi_server_config.lng b/interface/web/admin/lib/lang/fi_server_config.lng
index 0bddcc7d8639547380e7160fbf209ca797a06566..efa122033c8a22c75675bb5c2caaaf377f186a79 100755
--- a/interface/web/admin/lib/lang/fi_server_config.lng
+++ b/interface/web/admin/lib/lang/fi_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/fi_software_package.lng b/interface/web/admin/lib/lang/fi_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/fi_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/fi_software_package_list.lng b/interface/web/admin/lib/lang/fi_software_package_list.lng
index 85e31f904b0793332126a27efbf11e039e855b25..87a9e193b5af46ab72dd14323f5d181e74e9907a 100755
--- a/interface/web/admin/lib/lang/fi_software_package_list.lng
+++ b/interface/web/admin/lib/lang/fi_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/fi_software_repo.lng b/interface/web/admin/lib/lang/fi_software_repo.lng
index c89969445fe5bfdddf0369b72c1934b578b0b7f8..f875f428b61f390155ef162d7e27f404328627b2 100755
--- a/interface/web/admin/lib/lang/fi_software_repo.lng
+++ b/interface/web/admin/lib/lang/fi_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'Varaston internetosoite';
$wb['repo_username_txt'] = 'Käyttäjätunnus (valinnainen)';
$wb['repo_password_txt'] = 'Salasana (valinnnainen)';
$wb['active_txt'] = 'Käytössä';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/fi_system_config.lng b/interface/web/admin/lib/lang/fi_system_config.lng
index 1ed39352bcf01c375758fc3b252a0df220309b7f..c2c1dab75beda91dfb16bc72646f073cabf3096a 100755
--- a/interface/web/admin/lib/lang/fi_system_config.lng
+++ b/interface/web/admin/lib/lang/fi_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng
index c74d89ec1cd92f9858d483843e9656ca29732b68..eabca449d80d7fc7426ee13bfa531bf17c244214 100644
--- a/interface/web/admin/lib/lang/fr_server_config.lng
+++ b/interface/web/admin/lib/lang/fr_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/fr_software_package.lng b/interface/web/admin/lib/lang/fr_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/fr_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/fr_software_package_list.lng b/interface/web/admin/lib/lang/fr_software_package_list.lng
index d6e1d14d4863471e0a6abdf94ddf5d8c07fe3a83..405b9e296fb191f3b337bf4f54ee0a8213748d4a 100644
--- a/interface/web/admin/lib/lang/fr_software_package_list.lng
+++ b/interface/web/admin/lib/lang/fr_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Mettre à jour la liste des paquets';
$wb['package_id_txt'] = 'App-ID locale';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/fr_software_repo.lng b/interface/web/admin/lib/lang/fr_software_repo.lng
index 7b3ec481a2867b3d383dd73d2f04f76b4fd1a48f..f65c955d52d18927304af8fd78f1148091496408 100644
--- a/interface/web/admin/lib/lang/fr_software_repo.lng
+++ b/interface/web/admin/lib/lang/fr_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Utilisateur (optionnel)';
$wb['repo_password_txt'] = 'Mot de passe (optionnel)';
$wb['active_txt'] = 'Actif';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/fr_system_config.lng b/interface/web/admin/lib/lang/fr_system_config.lng
index 7a404d629cb92e8f496c684b422ca17a0f48384f..561a5d7274cbd521807b0b934d47c7962de1d007 100644
--- a/interface/web/admin/lib/lang/fr_system_config.lng
+++ b/interface/web/admin/lib/lang/fr_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/hr_server_config.lng b/interface/web/admin/lib/lang/hr_server_config.lng
index 27168f2c4dba3049699e8ef3eb761ca8e385126b..a441f968ade3df8d3657640581bd0954cc67a9eb 100644
--- a/interface/web/admin/lib/lang/hr_server_config.lng
+++ b/interface/web/admin/lib/lang/hr_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/hr_software_package.lng b/interface/web/admin/lib/lang/hr_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/hr_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/hr_software_package_list.lng b/interface/web/admin/lib/lang/hr_software_package_list.lng
index 66ee959b9182d0e7b92ae3fa2a3e8e5fa6f965d9..8381110feaa13a605efaecbc05e685749d5ea7a3 100644
--- a/interface/web/admin/lib/lang/hr_software_package_list.lng
+++ b/interface/web/admin/lib/lang/hr_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Paketi';
$wb['repoupdate_txt'] = 'Obnovi listu paketa';
$wb['package_id_txt'] = 'lokalni App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/hr_software_repo.lng b/interface/web/admin/lib/lang/hr_software_repo.lng
index 42064a130e9a4b9bc188fab9bd062e675790ed5b..bbfb2e2db29084c137cfd29804fc6be4ea2960ca 100644
--- a/interface/web/admin/lib/lang/hr_software_repo.lng
+++ b/interface/web/admin/lib/lang/hr_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Korisničko ime (opcionalno)';
$wb['repo_password_txt'] = 'Šifra (opcionalno)';
$wb['active_txt'] = 'Aktivno';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/hr_system_config.lng b/interface/web/admin/lib/lang/hr_system_config.lng
index 210a18b00f13d8ae535ad1876d0e67a15b6afe4e..2ff0cbc9fd479ccc436293a7e6380c9d4864f24d 100644
--- a/interface/web/admin/lib/lang/hr_system_config.lng
+++ b/interface/web/admin/lib/lang/hr_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/hu_server_config.lng b/interface/web/admin/lib/lang/hu_server_config.lng
index 53496080fbc2fec4ad4f5f737e4b08683283d09a..0be61efd12652147da16ba0948338ba905abedc9 100644
--- a/interface/web/admin/lib/lang/hu_server_config.lng
+++ b/interface/web/admin/lib/lang/hu_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/hu_software_package.lng b/interface/web/admin/lib/lang/hu_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/hu_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/hu_software_package_list.lng b/interface/web/admin/lib/lang/hu_software_package_list.lng
index d4749f0de2c14a0ba5f14ccc4f9d84b317f98f5f..430583ce8a807b7741947c3a561baa6ef165b74d 100644
--- a/interface/web/admin/lib/lang/hu_software_package_list.lng
+++ b/interface/web/admin/lib/lang/hu_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Csomagok';
$wb['repoupdate_txt'] = 'Csomaglista frissítése';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/hu_software_repo.lng b/interface/web/admin/lib/lang/hu_software_repo.lng
index f05284f14a8e29e1d95cb9470f14f8c43a5b92b8..3c578e3694e64e0bb61e2042a7af189fbb633b8b 100644
--- a/interface/web/admin/lib/lang/hu_software_repo.lng
+++ b/interface/web/admin/lib/lang/hu_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'Cím';
$wb['repo_username_txt'] = 'Felhasználó (opcionális)';
$wb['repo_password_txt'] = 'Jelszó (opcionális)';
$wb['active_txt'] = 'Aktív';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/hu_system_config.lng b/interface/web/admin/lib/lang/hu_system_config.lng
index f18d12f4cd23a4d8fc822c48949f294abcb2c52f..ee5f429e2f92937aae345d437a04814a63975fc8 100644
--- a/interface/web/admin/lib/lang/hu_system_config.lng
+++ b/interface/web/admin/lib/lang/hu_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/id_server_config.lng b/interface/web/admin/lib/lang/id_server_config.lng
index 39217c392ff885e079ba0a1b5a6e4dce95f95211..54a4493226e8c1580c076732c522e986d2445a29 100644
--- a/interface/web/admin/lib/lang/id_server_config.lng
+++ b/interface/web/admin/lib/lang/id_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/id_software_package.lng b/interface/web/admin/lib/lang/id_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/id_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/id_software_package_list.lng b/interface/web/admin/lib/lang/id_software_package_list.lng
index a7e4987ed6ba6dd896473268aae3fb52e61894ba..02642be6e2c75183a8a08800207bf82f36424fb5 100644
--- a/interface/web/admin/lib/lang/id_software_package_list.lng
+++ b/interface/web/admin/lib/lang/id_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Paket';
$wb['repoupdate_txt'] = 'Mutakhirkan daftar paket';
$wb['package_id_txt'] = 'App-ID lokal';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/id_software_repo.lng b/interface/web/admin/lib/lang/id_software_repo.lng
index a5647bc8cdda0debb334e302806e7ac78003a315..1c3b0305b4f25e5b09952507b4eb9c200dbc71bd 100644
--- a/interface/web/admin/lib/lang/id_software_repo.lng
+++ b/interface/web/admin/lib/lang/id_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Pengguna (opsional)';
$wb['repo_password_txt'] = 'Sandi (opsional)';
$wb['active_txt'] = 'Aktif';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/id_system_config.lng b/interface/web/admin/lib/lang/id_system_config.lng
index c68bc676c169dc82f04789b19a99e16e5c66c5cc..ecbf3c72c22684cca870dc50ba46a8fa46bf148e 100644
--- a/interface/web/admin/lib/lang/id_system_config.lng
+++ b/interface/web/admin/lib/lang/id_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng
index 6bea4d2ecfb6e215518b60ed85200faf52d9a6c7..d04076804781aef0e8be0ac067a03330eebe3ab1 100644
--- a/interface/web/admin/lib/lang/it_server_config.lng
+++ b/interface/web/admin/lib/lang/it_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/it_software_package.lng b/interface/web/admin/lib/lang/it_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/it_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/it_software_package_list.lng b/interface/web/admin/lib/lang/it_software_package_list.lng
index 87b27fd50b16af5b4ffe42a716a33db748143e64..9fa53867bc70f653a4410da5dc70988beebfdcdb 100644
--- a/interface/web/admin/lib/lang/it_software_package_list.lng
+++ b/interface/web/admin/lib/lang/it_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/it_software_repo.lng b/interface/web/admin/lib/lang/it_software_repo.lng
index 28ac8754b509afcd8c4e193be51af0d189b52445..7adc6b086304d11629ef981cc486238a0f5a3752 100644
--- a/interface/web/admin/lib/lang/it_software_repo.lng
+++ b/interface/web/admin/lib/lang/it_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Utente (facoltativo)';
$wb['repo_password_txt'] = 'Password (facoltativa)';
$wb['active_txt'] = 'Attivo';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/it_system_config.lng b/interface/web/admin/lib/lang/it_system_config.lng
index 60512a412ef28919f647d2e6d6a54d246c1fea40..8ba0b9fcb7bc0284cdd8d83849905168ff43cc48 100644
--- a/interface/web/admin/lib/lang/it_system_config.lng
+++ b/interface/web/admin/lib/lang/it_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/ja_server_config.lng b/interface/web/admin/lib/lang/ja_server_config.lng
index ce8803643eab0f374d19522c8e34831a2beaf7f2..890bb568b98fcc3058fdbb8550fce1ed78f85246 100644
--- a/interface/web/admin/lib/lang/ja_server_config.lng
+++ b/interface/web/admin/lib/lang/ja_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/ja_software_package.lng b/interface/web/admin/lib/lang/ja_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/ja_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/ja_software_package_list.lng b/interface/web/admin/lib/lang/ja_software_package_list.lng
index fb587767c87013cd08b17214964037219f15bb3a..e5352e91e7cf91fe7472f0797853dc7d9b77c1d9 100644
--- a/interface/web/admin/lib/lang/ja_software_package_list.lng
+++ b/interface/web/admin/lib/lang/ja_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/ja_software_repo.lng b/interface/web/admin/lib/lang/ja_software_repo.lng
index fba63e9985d77f2df3ab21cc1724be59098165cc..c95399a54ebba86be6c0d10e24e1bdecb0f737cb 100644
--- a/interface/web/admin/lib/lang/ja_software_repo.lng
+++ b/interface/web/admin/lib/lang/ja_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'ユーザー(必要があれば)';
$wb['repo_password_txt'] = 'パスワード(必要があれば)';
$wb['active_txt'] = '有効';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/ja_system_config.lng b/interface/web/admin/lib/lang/ja_system_config.lng
index f58ce702a9c92d42e79743e70a8f8ce6d6027bc9..842b65f3e76e1a14b3a27abd58f3137a7f4674ea 100644
--- a/interface/web/admin/lib/lang/ja_system_config.lng
+++ b/interface/web/admin/lib/lang/ja_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/nl_server_config.lng b/interface/web/admin/lib/lang/nl_server_config.lng
index c3b3ce0499c7bd101537d15bd3d97dfca6174eca..5d08e91f0bacab4214446c36c3440b7c52e6c3ae 100644
--- a/interface/web/admin/lib/lang/nl_server_config.lng
+++ b/interface/web/admin/lib/lang/nl_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/nl_software_package.lng b/interface/web/admin/lib/lang/nl_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/nl_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/nl_software_package_list.lng b/interface/web/admin/lib/lang/nl_software_package_list.lng
index ee5516a15e70b155636d76a372c0009a31eee356..33e66022bc33e6348d962c81aa34f4e3d4c1eb29 100644
--- a/interface/web/admin/lib/lang/nl_software_package_list.lng
+++ b/interface/web/admin/lib/lang/nl_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Pakketten';
$wb['repoupdate_txt'] = 'Update pakketlijst';
$wb['package_id_txt'] = 'locaal App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/nl_software_repo.lng b/interface/web/admin/lib/lang/nl_software_repo.lng
index 91f060de9d9ec5130064d6df7e47e874d03f66b1..665c4197a24af7dd5caa4cc89e2e599f4a9a953e 100644
--- a/interface/web/admin/lib/lang/nl_software_repo.lng
+++ b/interface/web/admin/lib/lang/nl_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'User (optionieel)';
$wb['repo_password_txt'] = 'Password (optionieel)';
$wb['active_txt'] = 'Actief';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/nl_system_config.lng b/interface/web/admin/lib/lang/nl_system_config.lng
index 65ed315cdd400f0b8400403b76370ee4e10acfb1..fe3b85e5e93e156b6224c29982600d57a7e8b7f7 100644
--- a/interface/web/admin/lib/lang/nl_system_config.lng
+++ b/interface/web/admin/lib/lang/nl_system_config.lng
@@ -52,4 +52,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/pl_server_config.lng b/interface/web/admin/lib/lang/pl_server_config.lng
index 175c9bedc31993892ce23add683ad4c88e6d137b..32c4c00e5d973350023cf3f8766757e8bf5bbc73 100644
--- a/interface/web/admin/lib/lang/pl_server_config.lng
+++ b/interface/web/admin/lib/lang/pl_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Prześlij informacje o przekroczeniu transferu do admina';
$wb['overtraffic_notify_client_txt'] = 'Prześlij informacje o przekroczeniu transferu do klienta';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/pl_software_package.lng b/interface/web/admin/lib/lang/pl_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/pl_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/pl_software_package_list.lng b/interface/web/admin/lib/lang/pl_software_package_list.lng
index 78c412c344818c823ee8e5d9b4fff8111b0e3782..cb47abc46d380b691323486a72343a62f531b3ce 100644
--- a/interface/web/admin/lib/lang/pl_software_package_list.lng
+++ b/interface/web/admin/lib/lang/pl_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Pakiety';
$wb['repoupdate_txt'] = 'Aktualizuj listę pakietów';
$wb['package_id_txt'] = 'lokalny App-ID';
$wb['no_packages_txt'] = 'Brak dostępnych pakietów';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/pl_software_repo.lng b/interface/web/admin/lib/lang/pl_software_repo.lng
index d11a1b3b330d331c507e129f195f3f6ada2874f5..1cc3dbb61c0846e040754b5462bb40ccf7cad308 100644
--- a/interface/web/admin/lib/lang/pl_software_repo.lng
+++ b/interface/web/admin/lib/lang/pl_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Użytkownik (Opcjonalnie)';
$wb['repo_password_txt'] = 'Hasło (Opcjonalnie)';
$wb['active_txt'] = 'Aktywny';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/pl_system_config.lng b/interface/web/admin/lib/lang/pl_system_config.lng
index dbcd61ffa193d5b8f618c9f296dc44746a4d2f4a..9d4f6f59ba1b463d2927a10995f655cf215e96cb 100644
--- a/interface/web/admin/lib/lang/pl_system_config.lng
+++ b/interface/web/admin/lib/lang/pl_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Wyłącz sprawdzanie nazwy klie
$wb['mailbox_show_autoresponder_tab_txt'] = 'Pokaż zakładkę autorespondera w szczegółach konta email.';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Pokaż zakładkę filtra email w szczegółach konta email.';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Pokaż zakładkę własnych filtrów email w szczegółach konta email.';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/pt_server_config.lng b/interface/web/admin/lib/lang/pt_server_config.lng
index 25d19f302b9f0f858aeb6537b44cea01f419c0c2..e427ed91cbf135c45a35e3f72ff9a4c69c23723a 100644
--- a/interface/web/admin/lib/lang/pt_server_config.lng
+++ b/interface/web/admin/lib/lang/pt_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/pt_software_package.lng b/interface/web/admin/lib/lang/pt_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/pt_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/pt_software_package_list.lng b/interface/web/admin/lib/lang/pt_software_package_list.lng
index 80b0c2e2c0dff39bd55a5c4ce23babcc61997597..1ec77bdd15f5403cd7bae71e328b56c5666f21ae 100644
--- a/interface/web/admin/lib/lang/pt_software_package_list.lng
+++ b/interface/web/admin/lib/lang/pt_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/pt_software_repo.lng b/interface/web/admin/lib/lang/pt_software_repo.lng
index c0e8fd24c97239d66f9759e547817da6a56fbabc..436758e6871176d63b44f4eb812ebe2b945dc187 100644
--- a/interface/web/admin/lib/lang/pt_software_repo.lng
+++ b/interface/web/admin/lib/lang/pt_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Utilizador (opcional)';
$wb['repo_password_txt'] = 'Senha (opcional)';
$wb['active_txt'] = 'Activo';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/pt_system_config.lng b/interface/web/admin/lib/lang/pt_system_config.lng
index 93389bbe9006ae353ab33874b0c87c5bb54a12cd..32ed93f26099ad84e27c8ea23ffe2396eb0eebed 100644
--- a/interface/web/admin/lib/lang/pt_system_config.lng
+++ b/interface/web/admin/lib/lang/pt_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/ro_server_config.lng b/interface/web/admin/lib/lang/ro_server_config.lng
index d3247ac82cbf4e53a0385dbf77c3ec0565afe665..55b7355602bdb36d8b709a0eba07eff66656c9a5 100644
--- a/interface/web/admin/lib/lang/ro_server_config.lng
+++ b/interface/web/admin/lib/lang/ro_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/ro_software_package.lng b/interface/web/admin/lib/lang/ro_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/ro_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/ro_software_package_list.lng b/interface/web/admin/lib/lang/ro_software_package_list.lng
index 1eca7d4232d6c653c0d78c071011bdd78a2ce3e0..4a8dcbcbf09d1141554f5f73e6a0cea790911448 100644
--- a/interface/web/admin/lib/lang/ro_software_package_list.lng
+++ b/interface/web/admin/lib/lang/ro_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/ro_software_repo.lng b/interface/web/admin/lib/lang/ro_software_repo.lng
index 574dd1162989badc8499f5af31451a43673bf4da..f2cbbb2c25776ab5f1794e7102ad264a98144049 100644
--- a/interface/web/admin/lib/lang/ro_software_repo.lng
+++ b/interface/web/admin/lib/lang/ro_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'User (optional)';
$wb['repo_password_txt'] = 'Password (optional)';
$wb['active_txt'] = 'Active';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/ro_system_config.lng b/interface/web/admin/lib/lang/ro_system_config.lng
index d8486c8b08291b041961bc57180eba03dd488dcd..d237d638af2929fd4175065dde2454688e1bb938 100644
--- a/interface/web/admin/lib/lang/ro_system_config.lng
+++ b/interface/web/admin/lib/lang/ro_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/ru_server_config.lng b/interface/web/admin/lib/lang/ru_server_config.lng
index f9cea0ca262cf1fc47f1b939a31e6a0aad6b5fad..5ae21a926237e324dffde8648c78834b1056a6ec 100644
--- a/interface/web/admin/lib/lang/ru_server_config.lng
+++ b/interface/web/admin/lib/lang/ru_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/ru_software_package.lng b/interface/web/admin/lib/lang/ru_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/ru_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/ru_software_package_list.lng b/interface/web/admin/lib/lang/ru_software_package_list.lng
index 41ebca92deeb3fbfd0eedc0e6599451acad30765..028ef00408d46121048be573b3435e23303d9c49 100644
--- a/interface/web/admin/lib/lang/ru_software_package_list.lng
+++ b/interface/web/admin/lib/lang/ru_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/ru_software_repo.lng b/interface/web/admin/lib/lang/ru_software_repo.lng
index 74fb30e05d10bfb73f0f12e44936ad63ef224f25..5aec8763c173d4ac73419c725857b0978e1b8743 100644
--- a/interface/web/admin/lib/lang/ru_software_repo.lng
+++ b/interface/web/admin/lib/lang/ru_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Логин (опционально)';
$wb['repo_password_txt'] = 'Пароль (опционально)';
$wb['active_txt'] = 'Активен?';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/ru_system_config.lng b/interface/web/admin/lib/lang/ru_system_config.lng
index 8d47e5fd2f77824b667ad6c63b93e0aee139be35..ee0fc50b077705443b61eba9e42c639537c84538 100644
--- a/interface/web/admin/lib/lang/ru_system_config.lng
+++ b/interface/web/admin/lib/lang/ru_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/se_server_config.lng b/interface/web/admin/lib/lang/se_server_config.lng
index df557e206979b59cd1cf44cf2c73b2b690d9e55b..089e629be37fbd044f7ddd8d5fe7511e5f1c21e4 100644
--- a/interface/web/admin/lib/lang/se_server_config.lng
+++ b/interface/web/admin/lib/lang/se_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/se_software_package.lng b/interface/web/admin/lib/lang/se_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/se_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/se_software_package_list.lng b/interface/web/admin/lib/lang/se_software_package_list.lng
index 87b27fd50b16af5b4ffe42a716a33db748143e64..9fa53867bc70f653a4410da5dc70988beebfdcdb 100644
--- a/interface/web/admin/lib/lang/se_software_package_list.lng
+++ b/interface/web/admin/lib/lang/se_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/se_software_repo.lng b/interface/web/admin/lib/lang/se_software_repo.lng
index 574dd1162989badc8499f5af31451a43673bf4da..f2cbbb2c25776ab5f1794e7102ad264a98144049 100644
--- a/interface/web/admin/lib/lang/se_software_repo.lng
+++ b/interface/web/admin/lib/lang/se_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'User (optional)';
$wb['repo_password_txt'] = 'Password (optional)';
$wb['active_txt'] = 'Active';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/se_system_config.lng b/interface/web/admin/lib/lang/se_system_config.lng
index d8486c8b08291b041961bc57180eba03dd488dcd..d237d638af2929fd4175065dde2454688e1bb938 100644
--- a/interface/web/admin/lib/lang/se_system_config.lng
+++ b/interface/web/admin/lib/lang/se_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/sk_server_config.lng b/interface/web/admin/lib/lang/sk_server_config.lng
index 0ea3647f2438eb6b72c2a102847aa6d346e3a107..c01606bf04c98c6b2c01de87cc1c3b367a0d70ff 100644
--- a/interface/web/admin/lib/lang/sk_server_config.lng
+++ b/interface/web/admin/lib/lang/sk_server_config.lng
@@ -171,4 +171,21 @@ $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attribu
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/sk_software_package.lng b/interface/web/admin/lib/lang/sk_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/sk_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/sk_software_package_list.lng b/interface/web/admin/lib/lang/sk_software_package_list.lng
index d6cf51120b4af144f0e589f6e5bb839429f4e277..502a3a2237707e5c196a6b6523743c118fb02870 100644
--- a/interface/web/admin/lib/lang/sk_software_package_list.lng
+++ b/interface/web/admin/lib/lang/sk_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/sk_software_repo.lng b/interface/web/admin/lib/lang/sk_software_repo.lng
index 16e835014a64a1c5cac43a414a386e8ca28ada46..263614f50c2b62177cdaf21eb27de6d42b6adc64 100644
--- a/interface/web/admin/lib/lang/sk_software_repo.lng
+++ b/interface/web/admin/lib/lang/sk_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Uživateľ (voliteľný)';
$wb['repo_password_txt'] = 'Heslo (voliteľné)';
$wb['active_txt'] = 'Aktivovať';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/sk_system_config.lng b/interface/web/admin/lib/lang/sk_system_config.lng
index bf2c0777f47755edd53acd2de8ea46d3ea582b84..3b8b68321e7ef49cd1408b94211236daaac7fb15 100644
--- a/interface/web/admin/lib/lang/sk_system_config.lng
+++ b/interface/web/admin/lib/lang/sk_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/tr_server_config.lng b/interface/web/admin/lib/lang/tr_server_config.lng
index a94949020185fd8a7a2bf89cd27a4d49aa1a6311..81595ff565ecc71284e56bef719c49a4432e201b 100644
--- a/interface/web/admin/lib/lang/tr_server_config.lng
+++ b/interface/web/admin/lib/lang/tr_server_config.lng
@@ -170,4 +170,22 @@ $wb['enable_ip_wildcard_txt'] = 'Enable IP wildcard (*)';
$wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
$wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/lib/lang/tr_software_package.lng b/interface/web/admin/lib/lang/tr_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/tr_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/tr_software_package_list.lng b/interface/web/admin/lib/lang/tr_software_package_list.lng
index eb1812880550900b685a2d1b7972f2f1c71e6228..0f33d0a31c589d8a7ffba116462bccbf264b6d40 100644
--- a/interface/web/admin/lib/lang/tr_software_package_list.lng
+++ b/interface/web/admin/lib/lang/tr_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/tr_software_repo.lng b/interface/web/admin/lib/lang/tr_software_repo.lng
index 67ce387eb3c3d73eb0a9aab7825d600bd6f36188..08c443babd32bd7e1877bc800fa8554226a36cdc 100644
--- a/interface/web/admin/lib/lang/tr_software_repo.lng
+++ b/interface/web/admin/lib/lang/tr_software_repo.lng
@@ -4,4 +4,5 @@ $wb['repo_url_txt'] = 'URL';
$wb['repo_username_txt'] = 'Kullanıcı (isteğe bağlı)';
$wb['repo_password_txt'] = 'Şifre (isteğe bağlı)';
$wb['active_txt'] = 'Aktif';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
diff --git a/interface/web/admin/lib/lang/tr_system_config.lng b/interface/web/admin/lib/lang/tr_system_config.lng
index 70e4853c739fbc645980b9073b34915227abe97c..e538a313f98f30ebe3b960c6c397a2a9165ea40e 100644
--- a/interface/web/admin/lib/lang/tr_system_config.lng
+++ b/interface/web/admin/lib/lang/tr_system_config.lng
@@ -49,4 +49,7 @@ $wb['client_username_web_check_disabled_txt'] = 'Disable client username check f
$wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/system_config_edit.php b/interface/web/admin/system_config_edit.php
index b83e704d4a1425ba551c6dfb7d85d67737bb2a40..c2702c78f74b42fc911035b63952b6df4bc847fc 100644
--- a/interface/web/admin/system_config_edit.php
+++ b/interface/web/admin/system_config_edit.php
@@ -78,6 +78,24 @@ class page_action extends tform_actions {
$app->tpl->setVar($record);
}
+ function onShowEnd() {
+ global $app, $conf;
+
+ // available dashlets
+ $available_dashlets_txt = '';
+ $handle = @opendir(ISPC_WEB_PATH.'/dashboard/dashlets');
+ while ($file = @readdir ($handle)) {
+ if ($file != '.' && $file != '..' && !is_dir($file)) {
+ $available_dashlets_txt .= '['.substr($file,0,-4).'] ';
+ }
+ }
+
+ if($available_dashlets_txt == '') $available_dashlets_txt = '------';
+ $app->tpl->setVar("available_dashlets_txt",$available_dashlets_txt);
+
+ parent::onShowEnd();
+ }
+
function onSubmit() {
global $app;
@@ -135,8 +153,9 @@ class page_action extends tform_actions {
$server_config_array[$section] = $new_config;
$server_config_str = $app->ini_parser->get_ini_string($server_config_array);
- $sql = "UPDATE sys_ini SET config = '".$app->db->quote($server_config_str)."' WHERE sysini_id = 1";
- if($conf['demo_mode'] != true) $app->db->query($sql);
+ //$sql = "UPDATE sys_ini SET config = '".$app->db->quote($server_config_str)."' WHERE sysini_id = 1";
+ //if($conf['demo_mode'] != true) $app->db->query($sql);
+ if($conf['demo_mode'] != true) $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($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/templates/system_config_misc_edit.htm b/interface/web/admin/templates/system_config_misc_edit.htm
index 16f6052c3022367344045d003188882fb3e5faa3..6538236ed823be06a6dfb56d6911f3f60a38426c 100644
--- a/interface/web/admin/templates/system_config_misc_edit.htm
+++ b/interface/web/admin/templates/system_config_misc_edit.htm
@@ -20,6 +20,30 @@
{tmpl_var name='tab_change_discard_txt'}
diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php index 2b72d8195374a1565bc2b0ee0625a2e1bf24544f..ab33d9e12669eeb839a384830d4936c75a06df60 100644 --- a/interface/web/client/client_edit.php +++ b/interface/web/client/client_edit.php @@ -49,8 +49,8 @@ $app->uses('tpl,tform,tform_actions'); $app->load('tform_actions'); class page_action extends tform_actions { - - + var $_template_additional = array(); + function onShowNew() { global $app, $conf; @@ -92,8 +92,28 @@ class page_action extends tform_actions { } } } - - parent::onSubmit(); + + if($this->id != 0) { + $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']); + $this->oldTemplatesAssigned = array(); + foreach($tpls as $item) { + $item = trim($item); + if(!$item) continue; + $this->oldTemplatesAssigned[] = array('assigned_template_id' => 0, 'client_template_id' => $item, 'client_id' => $this->id); + } + unset($tpls); + } + } else { + $this->oldTemplatesAssigned = array(); + } + + $this->_template_additional = explode('/', $this->dataRecord['template_additional']); + $this->dataRecord['template_additional'] = ''; + + parent::onSubmit(); } function onShowEnd() { @@ -110,16 +130,44 @@ class page_action extends tform_actions { } $app->tpl->setVar('tpl_add_select',$option); - $sql = "SELECT template_additional FROM client WHERE client_id = " . $this->id; - $result = $app->db->queryOneRecord($sql); - $tplAdd = explode("/", $result['template_additional']); - $text = ''; - foreach($tplAdd as $item){ - if (trim($item) != ''){ - if ($text != '') $text .= ''; - $text .= '{tmpl_var name='locked_txt'}
+{tmpl_var name='canceled_txt'}
+{tmpl_var name='locked_txt'}
+{tmpl_var name='canceled_txt'}
+{tmpl_var name='search_limit'} | @@ -32,6 +33,7 @@+ | @@ -47,6 +49,7 @@ | {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"} | diff --git a/interface/web/sites/templates/database_list.htm b/interface/web/sites/templates/database_list.htm index 888f3ba13e0ce8742e3b42d5ae57e350a9518147..15a8ae77cf4f8359f145a3d128e3a890849a8604 100644 --- a/interface/web/sites/templates/database_list.htm +++ b/interface/web/sites/templates/database_list.htm @@ -38,6 +38,7 @@ | {tmpl_var name='search_limit'} | @@ -47,6 +48,7 @@+ | @@ -61,6 +63,7 @@ | {tmpl_var name="remote_access"} | {tmpl_var name="type"} | {tmpl_var name="server_id"} | +{tmpl_var name="parent_domain_id"} | {tmpl_var name="database_user_id"} | {tmpl_var name="database_name"} |
diff --git a/interface/web/sites/templates/web_domain_advanced.htm b/interface/web/sites/templates/web_domain_advanced.htm
index 5df608add91fe05c4f4470325d4bc27f0f310099..2f5136ebe80ea8c83b6ae3b7ef2d07f524eb878c 100644
--- a/interface/web/sites/templates/web_domain_advanced.htm
+++ b/interface/web/sites/templates/web_domain_advanced.htm
@@ -1,6 +1,15 @@
+
+{tmpl_var name='configuration_error_txt'} +
+
+{tmpl_var name='config_error_tstamp'} : {tmpl_var name='config_error_msg'}
+
diff --git a/interface/web/sites/templates/web_domain_backup.htm b/interface/web/sites/templates/web_domain_backup.htm
index 3c78fe73de2fcf8bb3e9c83ea5c9cb265855c85d..cfe43379f5239f431b6dc508d1dfa7fb52d6e538 100644
--- a/interface/web/sites/templates/web_domain_backup.htm
+++ b/interface/web/sites/templates/web_domain_backup.htm
@@ -1,6 +1,15 @@
+
+{tmpl_var name='configuration_error_txt'} +
+
+{tmpl_var name='config_error_tstamp'} : {tmpl_var name='config_error_msg'}
+
diff --git a/interface/web/sites/templates/web_domain_edit.htm b/interface/web/sites/templates/web_domain_edit.htm
index 9a1062387af3a02aca38bb7bd25143e0856dfd1b..d12c3a36c2f70a2fbb238345a03ae95046793188 100644
--- a/interface/web/sites/templates/web_domain_edit.htm
+++ b/interface/web/sites/templates/web_domain_edit.htm
@@ -1,6 +1,15 @@
+
+{tmpl_var name='configuration_error_txt'} +
+
+{tmpl_var name='config_error_tstamp'} : {tmpl_var name='config_error_msg'}
+
@@ -172,6 +181,7 @@
jQuery('#client_group_id').change(function(){
clientGroupId = $(this).val();
reloadWebIP();
+ reloadFastcgiPHPVersions();
});
if(jQuery('#php').val() == 'fast-cgi' || jQuery('#php').val() == 'php-fpm'){
@@ -225,7 +235,7 @@
}
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"}, function(data) {
+ 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 phpfastcgiselected = '';
$.each(data, function(key, val) {
diff --git a/interface/web/sites/templates/web_domain_redirect.htm b/interface/web/sites/templates/web_domain_redirect.htm
index faff04441cd0e7681ea6d68362237b0cdafea953..c0bd977e25bcf9024e5d9489e4ff9a677f6f0089 100644
--- a/interface/web/sites/templates/web_domain_redirect.htm
+++ b/interface/web/sites/templates/web_domain_redirect.htm
@@ -1,6 +1,15 @@
+
+{tmpl_var name='configuration_error_txt'} +
+
+{tmpl_var name='config_error_tstamp'} : {tmpl_var name='config_error_msg'}
+
@@ -23,7 +32,7 @@
- {tmpl_var name="allowed_rewrite_rule_directives_txt"}
diff --git a/interface/web/sites/templates/web_domain_ssl.htm b/interface/web/sites/templates/web_domain_ssl.htm
index 832d623f616f2bae612092726f25dcbfdc02ec15..50d95d35069148a2504873ac0e945cb2d6b5d138 100644
--- a/interface/web/sites/templates/web_domain_ssl.htm
+++ b/interface/web/sites/templates/web_domain_ssl.htm
@@ -1,6 +1,15 @@
break if return rewrite set + {tmpl_var name="allowed_rewrite_rule_directives_txt"} break if return rewrite set http://wiki.nginx.org/HttpRewriteModule
+
+{tmpl_var name='configuration_error_txt'} +
+
+{tmpl_var name='config_error_tstamp'} : {tmpl_var name='config_error_msg'}
+
diff --git a/interface/web/sites/templates/web_domain_stats.htm b/interface/web/sites/templates/web_domain_stats.htm
index f497f1bb993fe17aa5c7619fc58c511b3f371056..769e088f8ac50d1cf6f54cb800ebafffab61d39f 100644
--- a/interface/web/sites/templates/web_domain_stats.htm
+++ b/interface/web/sites/templates/web_domain_stats.htm
@@ -1,6 +1,15 @@
+
+{tmpl_var name='configuration_error_txt'} +
+
+{tmpl_var name='config_error_tstamp'} : {tmpl_var name='config_error_msg'}
+
diff --git a/interface/web/sites/web_aliasdomain_edit.php b/interface/web/sites/web_aliasdomain_edit.php
index 150cb36a4468184f951f0b27ae64f4082d505edb..1d05a5e8ff9ec76c5fcb99d4e56f2980ca10ee15 100644
--- a/interface/web/sites/web_aliasdomain_edit.php
+++ b/interface/web/sites/web_aliasdomain_edit.php
@@ -143,7 +143,8 @@ class page_action extends tform_actions {
}
// 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"]));
+ $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'));
+ 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
$this->dataRecord["type"] = 'alias';
diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php
index 5c0ec9a2d9c8fe6fe0f57ece8e9d3ec828a7d99d..062529fda339b15d151f38d882a795c15cabf18b 100644
--- a/interface/web/sites/web_domain_edit.php
+++ b/interface/web/sites/web_domain_edit.php
@@ -188,8 +188,11 @@ class page_action extends tform_actions {
$client_select = '';
//$tmp_data_record = $app->tform->getDataRecord($this->id);
if(is_array($records)) {
+ $selected_client_group_id = 0; // needed to get list of PHP versions
foreach( $records as $rec) {
+ if(is_array($this->dataRecord) && ($rec["groupid"] == $this->dataRecord['client_group_id'] || $rec["groupid"] == $this->dataRecord['sys_groupid']) && !$selected_client_group_id) $selected_client_group_id = $rec["groupid"];
$selected = @(is_array($this->dataRecord) && ($rec["groupid"] == $this->dataRecord['client_group_id'] || $rec["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
+ if($selected == 'SELECTED') $selected_client_group_id = $rec["groupid"];
$client_select .= "\r\n";
}
}
@@ -229,11 +232,14 @@ 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 = $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']).")";
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 ? $this->dataRecord['server_id'] : intval($client['default_webserver']))." AND (client_id = 0 OR client_id=".$_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 = ".($this->id > 0 ? $this->dataRecord['server_id'] : intval($client['default_webserver'])).$sql_where);
}
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 ? $this->dataRecord['server_id'] : intval($client['default_webserver']))." AND (client_id = 0 OR client_id=".$_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 = ".($this->id > 0 ? $this->dataRecord['server_id'] : intval($client['default_webserver'])).$sql_where);
}
$php_select = "";
if(is_array($php_records) && !empty($php_records)) {
@@ -350,16 +356,36 @@ class page_action extends tform_actions {
$app->tpl->setVar("ipv6_address",$ip_select);
unset($tmp);
unset($ips);
+
+ // 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 sys_group.client_id > 0 ORDER BY sys_group.name";
+ $clients = $app->db->queryAllRecords($sql);
+ $client_select = "";
+ //$tmp_data_record = $app->tform->getDataRecord($this->id);
+ if(is_array($clients)) {
+ $selected_client_group_id = 0; // needed to get list of PHP versions
+ foreach($clients as $client) {
+ if(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']) && !$selected_client_group_id) $selected_client_group_id = $client["groupid"];
+ //$selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':'';
+ $selected = @(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
+ if($selected == 'SELECTED') $selected_client_group_id = $client["groupid"];
+ $client_select .= "\r\n";
+ }
+ }
+ $app->tpl->setVar("client_group_id",$client_select);
//PHP Version Selection (FastCGI)
$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 = $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']).")";
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");
+ $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($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 = $server_id");
+ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = $server_id".$sql_where);
}
$php_select = "";
if(is_array($php_records) && !empty($php_records)) {
@@ -375,20 +401,6 @@ class page_action extends tform_actions {
}
$app->tpl->setVar("fastcgi_php_version",$php_select);
unset($php_records);
-
- // 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 sys_group.client_id > 0 ORDER BY sys_group.name";
- $clients = $app->db->queryAllRecords($sql);
- $client_select = "";
- //$tmp_data_record = $app->tform->getDataRecord($this->id);
- if(is_array($clients)) {
- foreach( $clients as $client) {
- //$selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':'';
- $selected = @(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
- $client_select .= "\r\n";
- }
- }
- $app->tpl->setVar("client_group_id",$client_select);
foreach($read_limits as $limit) $app->tpl->setVar($limit, ($limit == 'force_suexec' ? 'n' : 'y'));
@@ -494,6 +506,17 @@ class page_action extends tform_actions {
}
$app->tpl->setVar("domain_option",$domain_select);
}
+
+ // 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:".$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");
+ if(is_array($datalog) && !empty($datalog)){
+ if(trim($datalog['error']) != ''){
+ $app->tpl->setVar("config_error_msg",nl2br(htmlentities($datalog['error'])));
+ $app->tpl->setVar("config_error_tstamp",date($app->lng('conf_format_datetime'), $datalog['tstamp']));
+ }
+ }
+ }
parent::onShowEnd();
}
@@ -700,6 +723,10 @@ class page_action extends tform_actions {
$rewrite_rule_lines = explode("\n", $rewrite_rules);
if(is_array($rewrite_rule_lines) && !empty($rewrite_rule_lines)){
foreach($rewrite_rule_lines as $rewrite_rule_line){
+ // ignore comments
+ if(substr(ltrim($rewrite_rule_line),0,1) == '#') continue;
+ // empty lines
+ if(trim($rewrite_rule_line) == '') continue;
// rewrite
if(preg_match('@^\s*rewrite\s+(^/)?\S+(\$)?\s+\S+(\s+(last|break|redirect|permanent|))?\s*;\s*$@', $rewrite_rule_line)) continue;
// if
@@ -714,7 +741,6 @@ class page_action extends tform_actions {
}
// break
if(preg_match('@^\s*break\s*;\s*$@', $rewrite_rule_line)){
- $if_level += 1;
continue;
}
// return code [ text ]
@@ -1001,7 +1027,16 @@ class page_action extends tform_actions {
unset($backup_copies);
unset($backup_interval);
}
-
+
+ //* Change vhost subdomain ip/ipv6 if domain ip/ipv6 has changed
+ if(isset($this->dataRecord['ip_address']) && ($this->dataRecord['ip_address'] != $this->oldDataRecord['ip_address'] || $this->dataRecord['ipv6_address'] != $this->oldDataRecord['ipv6_address'])) {
+ $records = $app->db->queryAllRecords("SELECT domain_id FROM web_domain WHERE type = 'vhostsubdomain' AND parent_domain_id = ".$this->id);
+ foreach($records as $rec) {
+ $app->db->datalogUpdate('web_domain', "ip_address = '".$web_rec['ip_address']."', ipv6_address = '".$web_rec['ipv6_address']."'", 'domain_id', $rec['domain_id']);
+ }
+ unset($records);
+ unset($rec);
+ }
}
function onAfterDelete() {
diff --git a/interface/web/sites/web_folder_edit.php b/interface/web/sites/web_folder_edit.php
index 178c2af695fef9330811b83dcaf0c01c15bed473..2f888a12a2ce9c143e69fbae2228943822a978eb 100644
--- a/interface/web/sites/web_folder_edit.php
+++ b/interface/web/sites/web_folder_edit.php
@@ -55,7 +55,8 @@ class page_action extends tform_actions {
global $app, $conf;
// Get the record of the parent domain
- $parent_domain = $app->db->queryOneRecord("select server_id FROM web_domain WHERE domain_id = ".$app->functions->intval(@$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'));
+ 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
$this->dataRecord["server_id"] = $parent_domain["server_id"];
diff --git a/interface/web/sites/web_folder_user_edit.php b/interface/web/sites/web_folder_user_edit.php
index 95a8864499f0444e59e6dd868247d9f0241812e6..c67e8230cff5a0dc47cc737a7f077877d03be21f 100644
--- a/interface/web/sites/web_folder_user_edit.php
+++ b/interface/web/sites/web_folder_user_edit.php
@@ -55,7 +55,8 @@ class page_action extends tform_actions {
global $app, $conf;
// Get the record of the parent domain
- $folder = $app->db->queryOneRecord("select server_id 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 = ".$app->functions->intval(@$this->dataRecord["web_folder_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+ 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
$this->dataRecord["server_id"] = $folder["server_id"];
diff --git a/interface/web/sites/web_subdomain_edit.php b/interface/web/sites/web_subdomain_edit.php
index ae9ee074e784531284cf0033892e6131ff6beed8..3475ed5c0ad7698433f5c879c1cf23b2f2f23c4d 100644
--- a/interface/web/sites/web_subdomain_edit.php
+++ b/interface/web/sites/web_subdomain_edit.php
@@ -132,7 +132,8 @@ 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"]));
+ $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'));
+ if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
$app->uses('ini_parser,getconf');
$settings = $app->getconf->get_global_config('domains');
diff --git a/interface/web/sites/web_vhost_subdomain_edit.php b/interface/web/sites/web_vhost_subdomain_edit.php
index 656a7dd3d122dc8286d559c9465d06b921b4d8f6..97e84f4f59767bd9fc107025cee249b8548d6a27 100644
--- a/interface/web/sites/web_vhost_subdomain_edit.php
+++ b/interface/web/sites/web_vhost_subdomain_edit.php
@@ -368,7 +368,8 @@ class page_action extends tform_actions {
unset($tmp);
}
- $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$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'));
+ 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
$this->dataRecord["type"] = 'vhostsubdomain';
diff --git a/interface/web/sites/webdav_user_edit.php b/interface/web/sites/webdav_user_edit.php
index c6eaaf99410989283ee587d4b0089ba1947d7cfe..377b00eb0abafa48a96100e7957b7f12d438b31f 100644
--- a/interface/web/sites/webdav_user_edit.php
+++ b/interface/web/sites/webdav_user_edit.php
@@ -98,7 +98,8 @@ 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"]));
+ $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'));
+ 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
diff --git a/remoting_client/examples/client_add.php b/remoting_client/examples/client_add.php
index 25412ec0ae3f3dc146c1172376435cd8022dacf3..95faffda2d633005203395fa47f58a1686e1ee2d 100644
--- a/remoting_client/examples/client_add.php
+++ b/remoting_client/examples/client_add.php
@@ -25,7 +25,7 @@ try {
'zip' => '21337',
'city' => 'london',
'state' => 'bavaria',
- 'country' => 'UK',
+ 'country' => 'GB',
'telephone' => '123456789',
'mobile' => '987654321',
'fax' => '546718293',
diff --git a/remoting_client/examples/client_update.php b/remoting_client/examples/client_update.php
index 82f879703daafbd3a6a08a2071657514de431875..e884378434e0e88bb4fc1e832a8e91ec4ef4d068 100644
--- a/remoting_client/examples/client_update.php
+++ b/remoting_client/examples/client_update.php
@@ -16,17 +16,20 @@ try {
//* Parameters
$reseller_id = 1;
- $c_id = 1;
+ $client_id = 1;
//* Get the client record
- $client_record = $client->client_get($session_id, $reseller_id);
+ $client_record = $client->client_get($session_id, $client_id);
//* Change parameters
$client_record['country'] = 'de';
$client_record['username'] = 'mguy';
$client_record['contact_name'] = 'brush';
+ //* We set the client password to a empty string as we do not want to change it.
+ $client_record['password'] = '';
+
$affected_rows = $client->client_update($session_id, $c_id, $reseller_id, $client_record);
echo "Number of records that have been changed in the database: ".$affected_rows." "; diff --git a/server/cron_daily.php b/server/cron_daily.php index 21d8f84f0bce075b2108d59afe30816fe7910eb4..029c4f30fb2b020227dc0b7ec1348937bf7321d8 100644 --- a/server/cron_daily.php +++ b/server/cron_daily.php @@ -33,6 +33,7 @@ require(SCRIPT_PATH."/lib/config.inc.php"); require(SCRIPT_PATH."/lib/app.inc.php"); set_time_limit(0); +ini_set('error_reporting', E_ALL & ~E_NOTICE); // make sure server_id is always an int $conf['server_id'] = intval($conf['server_id']); @@ -742,10 +743,10 @@ if ($app->dbmaster == $app->db) { //* Send traffic notifications if($rec['traffic_quota_lock'] != 'y' && ($web_config['overtraffic_notify_admin'] == 'y' || $web_config['overtraffic_notify_client'] == 'y')) { - + $placeholders = array('{domain}' => $rec['domain'], - '{admin_mail}' => $global_config['admin_mail']); - + '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root')); + $recipients = array(); //* send email to admin if($global_config['admin_mail'] != '' && $web_config['overtraffic_notify_admin'] == 'y') { @@ -860,7 +861,7 @@ if ($app->dbmaster == $app->db) { // send notification - everything ok again if($rec['last_quota_notification'] && $web_config['overquota_notify_onok'] == 'y' && ($web_config['overquota_notify_admin'] == 'y' || $web_config['overquota_notify_client'] == 'y')) { $placeholders = array('{domain}' => $rec['domain'], - '{admin_mail}' => $global_config['admin_mail'], + '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'), '{used}' => $rec['used'], '{soft}' => $rec['soft'], '{hard}' => $rec['hard'], @@ -897,7 +898,7 @@ if ($app->dbmaster == $app->db) { $app->dbmaster->datalogUpdate('web_domain', "last_quota_notification = CURDATE()", 'domain_id', $rec['domain_id']); $placeholders = array('{domain}' => $rec['domain'], - '{admin_mail}' => $global_config['admin_mail'], + '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'), '{used}' => $rec['used'], '{soft}' => $rec['soft'], '{hard}' => $rec['hard'], @@ -990,7 +991,7 @@ if ($app->dbmaster == $app->db) { // send notification - everything ok again if($rec['last_quota_notification'] && $mail_config['overquota_notify_onok'] == 'y' && ($mail_config['overquota_notify_admin'] == 'y' || $mail_config['overquota_notify_client'] == 'y')) { $placeholders = array('{email}' => $rec['email'], - '{admin_mail}' => $global_config['admin_mail'], + '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'), '{used}' => $rec['used'], '{name}' => $rec['name'], '{quota}' => $rec['quota'], @@ -1027,7 +1028,7 @@ if ($app->dbmaster == $app->db) { $app->dbmaster->datalogUpdate('mail_user', "last_quota_notification = CURDATE()", 'mailuser_id', $rec['mailuser_id']); $placeholders = array('{email}' => $rec['email'], - '{admin_mail}' => $global_config['admin_mail'], + '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'), '{used}' => $rec['used'], '{name}' => $rec['name'], '{quota}' => $rec['quota'], @@ -1237,7 +1238,8 @@ if($backup_dir != '') { if ($rec['type'] == 'mysql') { $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 '".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."'"; exec($command, $tmp_output, $retval); //* Compress the backup with gzip diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php index 11bf8daf2328ddaa9e0d70d1acfdeedf757dc6a7..321e5c6ffb4a647e8349e951a7292847109c364e 100755 --- a/server/lib/app.inc.php +++ b/server/lib/app.inc.php @@ -156,7 +156,7 @@ class app { } // if - if($priority >= $conf['admin_notify_priority'] && $conf['admin_mail'] != '') { + if(isset($conf['admin_notify_priority']) && $priority >= $conf['admin_notify_priority'] && $conf['admin_mail'] != '') { // send notification to admin $mailBody = $log_msg; $mailSubject = substr($log_msg,0,50).'...'; diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index 2974da09c9bcdd5812a5cbf725b9ee11a32060fa..23ba8a627e72a0e6257a809e13d7741aa7228328 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -373,6 +373,15 @@ public function toLower($record) { return true; } + + //** Deletes a record and saves the changes into the datalog + 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); + + return true; + } public function freeResult($query) diff --git a/server/mods-available/dns_module.inc.php b/server/mods-available/dns_module.inc.php index 2fac7b5c5697a85abddad9ae05f1e8cf0886b680..2a06361e6b1d1b3d639870f8392debf598d6ec20 100644 --- a/server/mods-available/dns_module.inc.php +++ b/server/mods-available/dns_module.inc.php @@ -130,9 +130,9 @@ class dns_module { $retval = array('output' => '', 'retval' => 0); if($action == 'restart') { - exec($conf['init_scripts'] . '/' . $daemon . ' restart', $retval['output'], $retval['retval']); + exec($conf['init_scripts'] . '/' . $daemon . ' restart 2>&1', $retval['output'], $retval['retval']); } else { - exec($conf['init_scripts'] . '/' . $daemon . ' reload', $retval['output'], $retval['retval']); + exec($conf['init_scripts'] . '/' . $daemon . ' reload 2>&1', $retval['output'], $retval['retval']); } return $retval; } @@ -179,7 +179,7 @@ class dns_module { } $retval = array('output' => '', 'retval' => 0); - exec($conf['init_scripts'] . '/' . $daemon . ' restart', $retval['output'], $retval['retval']); + exec($conf['init_scripts'] . '/' . $daemon . ' restart 2>&1', $retval['output'], $retval['retval']); // unset $tmps; return $retval; diff --git a/server/mods-available/web_module.inc.php b/server/mods-available/web_module.inc.php index 52d4aeddb90a52dfee8c9aebb15f73c77ab1f0a7..868cf9e20c1249894196f792ed302b858b434e87 100644 --- a/server/mods-available/web_module.inc.php +++ b/server/mods-available/web_module.inc.php @@ -212,9 +212,9 @@ class web_module { $retval = array('output' => '', 'retval' => 0); if($action == 'restart') { - exec($conf['init_scripts'] . '/' . $daemon . ' restart', $retval['output'], $retval['retval']); + exec($conf['init_scripts'] . '/' . $daemon . ' restart 2>&1', $retval['output'], $retval['retval']); } else { - exec($conf['init_scripts'] . '/' . $daemon . ' reload', $retval['output'], $retval['retval']); + exec($conf['init_scripts'] . '/' . $daemon . ' reload 2>&1', $retval['output'], $retval['retval']); } return $retval; } @@ -231,7 +231,7 @@ class web_module { if(!$init_script) $init_script = $conf['init_scripts'].'/'.$web_config['php_fpm_init_script']; $retval = array('output' => '', 'retval' => 0); - exec($init_script.' '.$action, $retval['output'], $retval['retval']); + exec($init_script.' '.$action.' 2>&1', $retval['output'], $retval['retval']); return $retval; } diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 0107cbba1f766165bbf6d256458fd98ac5274d28..5bc44075014519f903dba5d0f63ad2b111e37233 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1563,7 +1563,7 @@ class apache2_plugin { if($web_config['check_apache_config'] == 'y') { //* Test if apache starts with the new configuration file $apache_online_status_before_restart = $this->_checkTcp('localhost',80); - $app->log('Apache status is: '.$apache_online_status_before_restart,LOGLEVEL_DEBUG); + $app->log('Apache status is: '.($apache_online_status_before_restart === true? 'running' : 'down'),LOGLEVEL_DEBUG); $retval = $app->services->restartService('httpd','restart'); // $retval['retval'] is 0 on success and > 0 on failure $app->log('Apache restart return value is: '.$retval['retval'],LOGLEVEL_DEBUG); @@ -1577,39 +1577,49 @@ class apache2_plugin { sleep(1); } //* Check if apache restarted successfully if it was online before - $app->log('Apache online status after restart is: '.$apache_online_status_after_restart,LOGLEVEL_DEBUG); + $app->log('Apache online status after restart is: '.($apache_online_status_after_restart === true? 'running' : 'down'),LOGLEVEL_DEBUG); if($apache_online_status_before_restart && !$apache_online_status_after_restart || $retval['retval'] > 0) { $app->log('Apache did not restart after the configuration change for website '.$data['new']['domain'].'. Reverting the configuration. Saved non-working config as '.$vhost_file.'.err',LOGLEVEL_WARN); if(is_array($retval['output']) && !empty($retval['output'])){ $app->log('Reason for Apache restart failure: '.implode("\n", $retval['output']),LOGLEVEL_WARN); + $app->dbmaster->datalogError(implode("\n", $retval['output'])); } else { // if no output is given, check again $webserver_binary = ''; - exec('which apache2', $webserver_check_output, $webserver_check_retval); + exec('which apache2ctl', $webserver_check_output, $webserver_check_retval); if($webserver_check_retval == 0){ - $webserver_binary = 'apache2'; + $webserver_binary = 'apache2ctl'; } else { unset($webserver_check_output, $webserver_check_retval); - exec('which httpd2', $webserver_check_output, $webserver_check_retval); + exec('which apache2', $webserver_check_output, $webserver_check_retval); if($webserver_check_retval == 0){ - $webserver_binary = 'httpd2'; + $webserver_binary = 'apache2'; } else { unset($webserver_check_output, $webserver_check_retval); - exec('which httpd', $webserver_check_output, $webserver_check_retval); + exec('which httpd2', $webserver_check_output, $webserver_check_retval); if($webserver_check_retval == 0){ - $webserver_binary = 'httpd'; + $webserver_binary = 'httpd2'; } else { unset($webserver_check_output, $webserver_check_retval); - exec('which apache', $webserver_check_output, $webserver_check_retval); + exec('which httpd', $webserver_check_output, $webserver_check_retval); if($webserver_check_retval == 0){ - $webserver_binary = 'apache'; + $webserver_binary = 'httpd'; + } else { + unset($webserver_check_output, $webserver_check_retval); + exec('which apache', $webserver_check_output, $webserver_check_retval); + if($webserver_check_retval == 0){ + $webserver_binary = 'apache'; + } } } } } if($webserver_binary != ''){ exec($webserver_binary.' -t 2>&1', $tmp_output, $tmp_retval); - if($tmp_retval > 0 && is_array($tmp_output) && !empty($tmp_output)) $app->log('Reason for Apache restart failure: '.implode("\n", $tmp_output),LOGLEVEL_WARN); + if($tmp_retval > 0 && is_array($tmp_output) && !empty($tmp_output)){ + $app->log('Reason for Apache restart failure: '.implode("\n", $tmp_output),LOGLEVEL_WARN); + $app->dbmaster->datalogError(implode("\n", $tmp_output)); + } unset($tmp_output, $tmp_retval); } } diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index dd9bcd70e1e9c11236b6e7f88cd25e625ed7f6c0..181eedb190d8824b916e82d6e663771fa00ad93a 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -940,6 +940,7 @@ class nginx_plugin { if($vhost_data['php'] == 'fast-cgi') $vhost_data['php'] = 'php-fpm'; // Custom rewrite rules + /* $final_rewrite_rules = array(); $custom_rewrite_rules = $data['new']['rewrite_rules']; // Make sure we only have Unix linebreaks @@ -952,6 +953,85 @@ class nginx_plugin { } } $tpl->setLoop('rewrite_rules', $final_rewrite_rules); + */ + + // Custom rewrite rules + $final_rewrite_rules = array(); + + if(isset($data['new']['rewrite_rules']) && trim($data['new']['rewrite_rules']) != '') { + $custom_rewrite_rules = trim($data['new']['rewrite_rules']); + $custom_rewrites_are_valid = true; + // use this counter to make sure all curly brackets are properly closed + $if_level = 0; + // Make sure we only have Unix linebreaks + $custom_rewrite_rules = str_replace("\r\n", "\n", $custom_rewrite_rules); + $custom_rewrite_rules = str_replace("\r", "\n", $custom_rewrite_rules); + $custom_rewrite_rule_lines = explode("\n", $custom_rewrite_rules); + if(is_array($custom_rewrite_rule_lines) && !empty($custom_rewrite_rule_lines)){ + foreach($custom_rewrite_rule_lines as $custom_rewrite_rule_line){ + // ignore comments + if(substr(ltrim($custom_rewrite_rule_line),0,1) == '#'){ + $final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line); + continue; + } + // empty lines + if(trim($custom_rewrite_rule_line) == ''){ + $final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line); + continue; + } + // rewrite + if(preg_match('@^\s*rewrite\s+(^/)?\S+(\$)?\s+\S+(\s+(last|break|redirect|permanent|))?\s*;\s*$@', $custom_rewrite_rule_line)){ + $final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line); + continue; + } + // if + if(preg_match('@^\s*if\s+\(\s*\$\S+(\s+(\!?(=|~|~\*))\s+(\S+|\".+\"))?\s*\)\s*\{\s*$@', $custom_rewrite_rule_line)){ + $final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line); + $if_level += 1; + continue; + } + // if - check for files, directories, etc. + if(preg_match('@^\s*if\s+\(\s*\!?-(f|d|e|x)\s+\S+\s*\)\s*\{\s*$@', $custom_rewrite_rule_line)){ + $final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line); + $if_level += 1; + continue; + } + // break + if(preg_match('@^\s*break\s*;\s*$@', $custom_rewrite_rule_line)){ + $final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line); + continue; + } + // return code [ text ] + if(preg_match('@^\s*return\s+\d\d\d.*;\s*$@', $custom_rewrite_rule_line)){ + $final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line); + continue; + } + // return code URL + // return URL + if(preg_match('@^\s*return(\s+\d\d\d)?\s+(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*\@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&%\$#\=~_\-]+))*\s*;\s*$@', $custom_rewrite_rule_line)){ + $final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line); + continue; + } + // set + if(preg_match('@^\s*set\s+\$\S+\s+\S+\s*;\s*$@', $custom_rewrite_rule_line)){ + $final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line); + continue; + } + // closing curly bracket + if(trim($custom_rewrite_rule_line) == '}'){ + $final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line); + $if_level -= 1; + continue; + } + $custom_rewrites_are_valid = false; + break; + } + } + if(!$custom_rewrites_are_valid || $if_level != 0){ + $final_rewrite_rules = array(); + } + } + $tpl->setLoop('rewrite_rules', $final_rewrite_rules); // Custom nginx directives $final_nginx_directives = array(); @@ -1538,7 +1618,7 @@ class nginx_plugin { if($web_config['check_apache_config'] == 'y') { //* Test if nginx starts with the new configuration file $nginx_online_status_before_restart = $this->_checkTcp('localhost',80); - $app->log('nginx status is: '.$nginx_online_status_before_restart,LOGLEVEL_DEBUG); + $app->log('nginx status is: '.($nginx_online_status_before_restart === true? 'running' : 'down'),LOGLEVEL_DEBUG); $retval = $app->services->restartService('httpd','restart'); // $retval['retval'] is 0 on success and > 0 on failure $app->log('nginx restart return value is: '.$retval['retval'],LOGLEVEL_DEBUG); @@ -1548,15 +1628,19 @@ class nginx_plugin { //* Check if nginx restarted successfully if it was online before $nginx_online_status_after_restart = $this->_checkTcp('localhost',80); - $app->log('nginx online status after restart is: '.$nginx_online_status_after_restart,LOGLEVEL_DEBUG); + $app->log('nginx online status after restart is: '.($nginx_online_status_after_restart === true? 'running' : 'down'),LOGLEVEL_DEBUG); if($nginx_online_status_before_restart && !$nginx_online_status_after_restart || $retval['retval'] > 0) { $app->log('nginx did not restart after the configuration change for website '.$data['new']['domain'].'. Reverting the configuration. Saved non-working config as '.$vhost_file.'.err',LOGLEVEL_WARN); if(is_array($retval['output']) && !empty($retval['output'])){ $app->log('Reason for nginx restart failure: '.implode("\n", $retval['output']),LOGLEVEL_WARN); + $app->dbmaster->datalogError(implode("\n", $retval['output'])); } else { // if no output is given, check again exec('nginx -t 2>&1', $tmp_output, $tmp_retval); - if($tmp_retval > 0 && is_array($tmp_output) && !empty($tmp_output)) $app->log('Reason for nginx restart failure: '.implode("\n", $tmp_output),LOGLEVEL_WARN); + if($tmp_retval > 0 && is_array($tmp_output) && !empty($tmp_output)){ + $app->log('Reason for nginx restart failure: '.implode("\n", $tmp_output),LOGLEVEL_WARN); + $app->dbmaster->datalogError(implode("\n", $tmp_output)); + } unset($tmp_output, $tmp_retval); } $app->system->copy($vhost_file,$vhost_file.'.err'); diff --git a/server/server.php b/server/server.php index 38baa772d44c3560ce425c9da4a6416c840cd2f8..2ead4904321edc18ad2ad9e7cbf864a4d1a968e5 100644 --- a/server/server.php +++ b/server/server.php @@ -71,7 +71,8 @@ if ($app->dbmaster->connect_error == NULL) { unset($server_db_record); // retrieve admin email address for notifications - $sys_ini = $app->dbmaster->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = 1"); + //$sys_ini = $app->dbmaster->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = 1"); + $sys_ini = $app->db->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = 1"); $conf['sys_ini'] = $app->ini_parser->parse_ini_string(stripslashes($sys_ini['config'])); $conf['admin_mail'] = $conf['sys_ini']['mail']['admin_mail']; unset($sys_ini); |
---|