Commit 2332b227 authored by tbrehm's avatar tbrehm

Added support for mongodb. Many thanks to MaddinXx for the patch.

http://www.howtoforge.com/forums/showthread.php?t=62691
parent 615a0a96
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`;
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -453,6 +453,40 @@ class tools_monitor {
return $html;
}
function showMongoDB() {
global $app;
/* fetch the Data from the DB */
$record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'log_mongodb' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
if(isset($record['data'])) {
$html =
'<div class="systemmonitor-state state-'.$record['state'].'">
<div class="systemmonitor-content icons32 ico-'.$record['state'].'">';
/*
* First, we have to detect, if there is any monitoring-data.
* If not (because mongodb is not installed) show this.
*/
$data = unserialize($record['data']);
if ($data == '') {
$html .= '<p>'.
'MongoDB is not installed at this server.<br />' .
'See more (for debian) <a href="http://www.howtoforge.com/fail2ban_debian_etch" target="htf">here...</a>'.
'</p>';
}
else {
$html .= nl2br($data);
}
$html .= '</div></div>';
} else {
$html = '<p>There is no data available at the moment.</p>';
}
return $html;
}
function showIPTables() {
global $app;
$record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'iptables_rules' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
......
......@@ -31,4 +31,5 @@ vmail
getmail
ispconfig
courier
dovecot
\ No newline at end of file
dovecot
mongodb
......@@ -89,9 +89,9 @@ $form["tabs"]['server'] = array(
'v6_prefix' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array(0 => array('type' => 'ISV6PREFIX',
'errmsg' => 'v6_prefix_wrong'),
),
'validators' => array(0 => array('type' => 'ISV6PREFIX',
'errmsg' => 'v6_prefix_wrong'),
),
'default' => ''
),
'gateway' => array(
......@@ -117,13 +117,13 @@ $form["tabs"]['server'] = array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => 'server1.domain.tld',
'filters' => array( 0 => array( 'event' => 'SAVE',
'type' => 'IDNTOASCII'),
1 => array( 'event' => 'SHOW',
'type' => 'IDNTOUTF8'),
2 => array( 'event' => 'SAVE',
'type' => 'TOLOWER')
),
'filters' => array( 0 => array( 'event' => 'SAVE',
'type' => 'IDNTOASCII'),
1 => array( 'event' => 'SHOW',
'type' => 'IDNTOUTF8'),
2 => array( 'event' => 'SAVE',
'type' => 'TOLOWER')
),
'validators' => array(0 => array('type' => 'NOTEMPTY',
'errmsg' => 'hostname_error_empty'),
),
......@@ -182,9 +182,9 @@ $form["tabs"]['server'] = array(
'formtype' => 'TEXT',
'default' => '',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
'errmsg'=> 'monit_url_error_regex'),
),
'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
'errmsg'=> 'monit_url_error_regex'),
),
'value' => '',
'width' => '40',
'maxlength' => '255'
......@@ -210,9 +210,9 @@ $form["tabs"]['server'] = array(
'formtype' => 'TEXT',
'default' => '',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
'errmsg'=> 'munin_url_error_regex'),
),
'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
'errmsg'=> 'munin_url_error_regex'),
),
'value' => '',
'width' => '40',
'maxlength' => '255'
......@@ -275,19 +275,19 @@ $form["tabs"]['mail'] = array(
'width' => '40',
'maxlength' => '255'
),
'dkim_path' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '/var/db/dkim',
'validators' => array ( 0 => array ('type' => 'CUSTOM',
'class' => 'validate_dkim',
'function' => 'check_dkim_path',
'errmsg'=> 'dkim_path_error'),
),
'value' => '',
'width' => '40',
'maxlength' => '255'
),
'dkim_path' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '/var/db/dkim',
'validators' => array ( 0 => array ('type' => 'CUSTOM',
'class' => 'validate_dkim',
'function' => 'check_dkim_path',
'errmsg'=> 'dkim_path_error'),
),
'value' => '',
'width' => '40',
'maxlength' => '255'
),
'pop3_imap_daemon' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
......@@ -419,8 +419,8 @@ $form["tabs"]['mail'] = array(
'formtype' => 'TEXT',
'default' => '7',
'value' => '',
'width' => '20',
'maxlength' => '255'
'width' => '20',
'maxlength' => '255'
),
'overquota_notify_onok' => array(
'datatype' => 'VARCHAR',
......@@ -659,8 +659,8 @@ $form["tabs"]['web'] = array(
'formtype' => 'TEXT',
'default' => '7',
'value' => '',
'width' => '20',
'maxlength' => '255'
'width' => '20',
'maxlength' => '255'
),
'overquota_notify_onok' => array(
'datatype' => 'VARCHAR',
......@@ -1306,6 +1306,12 @@ $form["tabs"]['rescue'] = array(
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
'do_not_try_rescue_mongodb' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
'do_not_try_rescue_mysql' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
......
......@@ -146,6 +146,7 @@ $wb['php_fpm_socket_dir_error_empty'] = 'PHP-FPM Socket Verzeichnis ist leer.';
$wb['fastcgi_config_syntax_txt'] = 'FastCGI Konfigurations Syntax';
$wb['try_rescue_txt'] = 'Aktiviere Service Monitoring und Neustart bei Unerreichbarkeit';
$wb['do_not_try_rescue_httpd_txt'] = 'Deaktiviere HTTPD Monitoring';
$wb['do_not_try_rescue_mongodb_txt'] = 'Deaktiviere MongoDB Monitoring';
$wb['do_not_try_rescue_mysql_txt'] = 'Deaktiviere MySQL Monitoring';
$wb['do_not_try_rescue_mail_txt'] = 'Deaktiviere E-Mail Monitoring';
$wb['rescue_description_txt'] = '<b>Information:</b> Falls Sie MySQL stoppen möchten, wählen Sie die Funktion \'Deaktiviere MySQL Monitoring\' und warten Sie 2 bis 3 Minuten. Wenn Sie nicht 2 bis 3 Miunten warten wird ISPConfig versuchen MySQL wieder zu starten.';
......
......@@ -151,6 +151,7 @@ $wb["php_fpm_socket_dir_txt"] = 'PHP-FPM socket directory';
$wb["php_fpm_socket_dir_error_empty"] = 'PHP-FPM socket directory is empty.';
$wb["try_rescue_txt"] = 'Enable service monitoring and restart on failure';
$wb["do_not_try_rescue_httpd_txt"] = 'Disable HTTPD monitoring';
$wb["do_not_try_rescue_mongodb_txt"] = 'Disable MongoDB monitoring';
$wb["do_not_try_rescue_mysql_txt"] = 'Disable MySQL monitoring';
$wb["do_not_try_rescue_mail_txt"] = 'Disable Email monitoring';
$wb["rescue_description_txt"] = '<b>Information:</b> If you want to shut down mysql you have to select the "Disable MySQL monitor" checkbox and then wait 2-3 minutes.<br>If you do not wait 2-3 minutes, rescue will try to restart mysql!';
......@@ -190,4 +191,4 @@ $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:';
?>
?>
......@@ -17,6 +17,12 @@
{tmpl_var name='do_not_try_rescue_httpd'}
</div>
</div>
<div class="ctrlHolder">
<p class="label" style="width:300px">{tmpl_var name='do_not_try_rescue_mongodb_txt'}</p>
<div class="multiField" style="width:100px">
{tmpl_var name='do_not_try_rescue_mongodb'}
</div>
</div>
<div class="ctrlHolder">
<p class="label" style="width:300px">{tmpl_var name='do_not_try_rescue_mysql_txt'}</p>
<div class="multiField" style="width:100px">
......@@ -30,15 +36,15 @@
</div>
</div>
</fieldset>
<tmpl_var name="rescue_description_txt">
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<div class="buttonHolder buttons">
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
</div>
\ No newline at end of file
</div>
......@@ -122,6 +122,7 @@ $wb['monitor_services_smtp_txt'] = 'SMTP Server:';
$wb['monitor_services_pop_txt'] = 'POP3 Server:';
$wb['monitor_services_imap_txt'] = 'IMAP Server:';
$wb['monitor_services_mydns_txt'] = 'DNS Server:';
$wb['monitor_services_mongodb_txt'] = 'MongoDB Server:';
$wb['monitor_services_mysql_txt'] = 'MySQL Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Daten vom: ';
$wb['monitor_settings_datetimeformat_txt'] = 'd.m.Y H:i';
......@@ -134,6 +135,7 @@ $wb['monitor_title_raidstate_txt'] = 'RAID Status';
$wb['monitor_title_rkhunterlog_txt'] = 'RKHunter Protokoll';
$wb['monitor_updates_nosupport_txt'] = 'Ihre Distribution wird für die Überwachung nicht unterstützt';
$wb['monitor_title_fail2ban_txt'] = 'Fail2Ban Protokoll';
$wb['monitor_title_mongodb_txt'] = 'MongoDB Protokoll';
$wb['monitor_nosupportedraid1_txt'] = 'At the moment, we support mdadm or mpt-status for monitoring the RAID.<br>We cant find any of them at your server.<br><br>This means we can not support your RAID yet.';
$wb['monitor_serverstate_beancounterok_txt'] = 'The beancounter is ok';
$wb['monitor_serverstate_beancounterinfo_txt'] = 'There are vew failure in the beancounter';
......@@ -144,6 +146,7 @@ $wb['monitor_title_beancounter_txt'] = 'OpenVz VE BeanCounter';
$wb['monitor_beancounter_nosupport_txt'] = 'This server is not a OpenVz VE and has no beancounter information';
$wb['monitor_title_iptables_txt'] = 'IPTables Regeln';
$wb['Show fail2ban-Log'] = 'Fail2ban Protokoll anzeigen';
$wb['Show MongoDB-Log'] = 'MongoDB Protokoll anzeigen';
$wb['Show IPTables'] = 'IPTables anzeigen';
$wb['Show OpenVz VE BeanCounter'] = 'OpenVz VE BeanCounter anzeigen';
$wb['Show Monit'] = 'Monit anzeigen';
......
......@@ -46,6 +46,7 @@ $wb['Show ISPConfig-Log'] = 'Show ISPConfig-Log';
$wb['Show RKHunter-Log'] = 'Show RKHunter-Log';
$wb['Show Jobqueue'] = 'Show Jobqueue';
$wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
$wb['Show MongoDB-Log'] = 'Show MongoDB-Log';
$wb['Show IPTables'] = 'Show IPTables';
$wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
$wb['monitor_general_serverstate_txt'] = 'Server State';
......@@ -131,6 +132,7 @@ $wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
$wb['monitor_services_pop_txt'] = 'POP3-Server:';
$wb['monitor_services_imap_txt'] = 'IMAP-Server:';
$wb['monitor_services_mydns_txt'] = 'DNS-Server:';
$wb['monitor_services_mongodb_txt'] = 'MongoDB-Server:';
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Data from: ';
$wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i';
......@@ -142,6 +144,7 @@ $wb['monitor_title_mailq_txt'] = 'Mail Queue';
$wb['monitor_title_raidstate_txt'] = 'RAID Status';
$wb['monitor_title_rkhunterlog_txt'] = 'RKHunter Log';
$wb['monitor_title_fail2ban_txt'] = 'Fail2Ban Log';
$wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['monitor_title_iptables_txt'] = 'IPTables Rules';
$wb['monitor_title_beancounter_txt'] = 'OpenVz VE BeanCounter';
$wb['monitor_updates_nosupport_txt'] = 'Your distribution is not supported for this monitoring';
......
......@@ -190,6 +190,11 @@ $items[] = array( 'title' => "Show fail2ban-Log",
'link' => 'monitor/show_data.php?type=fail2ban',
'html_id' => 'fai2ban');
$items[] = array( 'title' => "Show MongoDB-Log",
'target' => 'content',
'link' => 'monitor/show_data.php?type=mongodb',
'html_id' => 'mongodb');
$items[] = array( 'title' => "Show IPTables",
'target' => 'content',
'link' => 'monitor/show_data.php?type=iptables',
......@@ -198,4 +203,4 @@ $items[] = array( 'title' => "Show IPTables",
$module["nav"][] = array( 'title' => 'Logfiles',
'open' => 1,
'items' => $items);
?>
\ No newline at end of file
?>
......@@ -124,6 +124,13 @@ switch($dataType) {
$title = $app->lng("monitor_title_fail2ban_txt") . ' (' . $monTransSrv . ' : ' . $_SESSION['monitor']['server_name'] . ')';
$description = '';
break;
case 'mongodb':
$template = 'templates/show_data.htm';
$output .= $app->tools_monitor->showMongoDB();
$time = $app->tools_monitor->getDataTime('log_mongodb');
$title = $app->lng("monitor_title_mongodb_txt") . ' (' . $monTransSrv . ' : ' . $_SESSION['monitor']['server_name'] . ')';
$description = '';
break;
case 'iptables':
$template = 'templates/show_data.htm';
$output .= $app->tools_monitor->showIPTables();
......
......@@ -57,17 +57,17 @@ class page_action extends tform_actions {
* If the names are restricted -> remove the restriction, so that the
* data can be edited
*/
//* Get the database user prefix
$app->uses('getconf,tools_sites');
$global_config = $app->getconf->get_global_config('sites');
$dbuser_prefix = $app->tools_sites->replacePrefix($global_config['dbuser_prefix'], $this->dataRecord);
if ($_SESSION["s"]["user"]["typ"] != 'admin' && $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
// Get the limits of the client
$client_group_id = $_SESSION["s"]["user"]["default_group"];
$client = $app->db->queryOneRecord("SELECT client.company_name, client.contact_name, client.client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
// Fill the client select field
$sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
$records = $app->db->queryAllRecords($sql);
......@@ -96,24 +96,24 @@ class page_action extends tform_actions {
}
$app->tpl->setVar("client_group_id",$client_select);
}
if ($this->dataRecord['database_user'] != ""){
/* REMOVE the restriction */
$app->tpl->setVar("database_user", $app->tools_sites->removePrefix($this->dataRecord['database_user'], $this->dataRecord['database_user_prefix'], $dbuser_prefix));
}
$app->tpl->setVar("database_user_prefix", $app->tools_sites->getPrefix($this->dataRecord['database_user_prefix'], $dbuser_prefix, $global_config['dbuser_prefix']));
parent::onShowEnd();
}
function onSubmit() {
global $app;
if($_SESSION['s']['user']['typ'] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) unset($this->dataRecord["client_group_id"]);
parent::onSubmit();
}
......@@ -126,35 +126,40 @@ class page_action extends tform_actions {
$dbuser_prefix = $app->tools_sites->replacePrefix($global_config['dbuser_prefix'], $this->dataRecord);
$this->oldDataRecord = $app->db->queryOneRecord("SELECT * FROM web_database_user WHERE database_user_id = '".$this->id."'");
$dbuser_prefix = $app->tools_sites->getPrefix($this->oldDataRecord['database_user_prefix'], $dbuser_prefix);
$this->dataRecord['database_user_prefix'] = $dbuser_prefix;
//* Database username shall not be empty
if($this->dataRecord['database_user'] == '') $app->tform->errorMessage .= $app->tform->wordbook["database_user_error_empty"].'<br />';
if(strlen($dbuser_prefix . $this->dataRecord['database_user']) > 16) $app->tform->errorMessage .= str_replace('{user}',$dbuser_prefix . $this->dataRecord['database_user'],$app->tform->wordbook["database_user_error_len"]).'<br />';
//* Check database user against blacklist
$dbuser_blacklist = array($conf['db_user'],'mysql','root');
if(in_array($dbuser_prefix . $this->dataRecord['database_user'],$dbuser_blacklist)) {
$app->tform->errorMessage .= $app->lng('Database user not allowed.').'<br />';
}
if ($app->tform->errorMessage == ''){
/* restrict the names if there is no error */
/* crop user and db names if they are too long -> mysql: user: 16 chars / db: 64 chars */
$this->dataRecord['database_user'] = substr($dbuser_prefix . $this->dataRecord['database_user'], 0, 16);
}
/* prepare password for MongoDB */
// TODO: this still doens't work as when only the username changes we have no database_password.
// taking the one from oldData doesn't work as it's encrypted...shit!
$this->dataRecord['database_password_mongo'] = $this->dataRecord['database_user'].":mongo:".$this->dataRecord['database_password'];
$this->dataRecord['server_id'] = 0; // we need this on all servers
parent::onBeforeUpdate();
}
function onBeforeInsert() {
global $app, $conf, $interfaceConf;
//* Database username shall not be empty
if($this->dataRecord['database_user'] == '') $app->tform->errorMessage .= $app->tform->wordbook["database_user_error_empty"].'<br />';
......@@ -162,11 +167,11 @@ class page_action extends tform_actions {
$app->uses('getconf,tools_sites');
$global_config = $app->getconf->get_global_config('sites');
$dbuser_prefix = $app->tools_sites->replacePrefix($global_config['dbuser_prefix'], $this->dataRecord);
$this->dataRecord['database_user_prefix'] = $dbuser_prefix;
if(strlen($dbuser_prefix . $this->dataRecord['database_user']) > 16) $app->tform->errorMessage .= str_replace('{user}',$dbuser_prefix . $this->dataRecord['database_user'],$app->tform->wordbook["database_user_error_len"]).'<br />';
//* Check database user against blacklist
$dbuser_blacklist = array($conf['db_user'],'mysql','root');
if(is_array($dbuser_blacklist) && in_array($dbuser_prefix . $this->dataRecord['database_user'],$dbuser_blacklist)) {
......@@ -178,15 +183,18 @@ class page_action extends tform_actions {
if ($app->tform->errorMessage == ''){
$this->dataRecord['database_user'] = substr($dbuser_prefix . $this->dataRecord['database_user'], 0, 16);
}
$this->dataRecord['server_id'] = 0; // we need this on all servers
$this->dataRecord['server_id'] = 0; // we need this on all servers
/* prepare password for MongoDB */
$this->dataRecord['database_password_mongo'] = $this->dataRecord['database_user'].":mongo:".$this->dataRecord['database_password'];
parent::onBeforeInsert();
}
function onAfterInsert() {
global $app, $conf;
if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) {
$client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]);
$app->db->query("UPDATE web_database_user SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE database_user_id = ".$this->id);
......@@ -208,9 +216,9 @@ class page_action extends tform_actions {
$client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]);
$app->db->query("UPDATE web_database_user SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE database_user_id = ".$this->id);
}
/*$password = $app->db->queryOneRecord("SELECT database_password FROM web_database_user WHERE database_user_id = ".$this->id);
$records = $app->db->queryAllRecords("SELECT DISTINCT server_id FROM web_database WHERE database_user_id = '".$app->functions->intval($this->id)."' UNION SELECT DISTINCT server_id FROM web_database WHERE database_ro_user_id = '".$app->functions->intval($this->id)."'");
foreach($records as $rec) {
$new_rec = $this->dataRecord;
......
......@@ -29,7 +29,7 @@
Hint:
The ID field of the database table is not part of the datafield definition.
The ID field must be always auto incement (int or bigint).
Search:
- searchable = 1 or searchable = 2 include the field in the search
- searchable = 1: this field will be the title of the search result
......@@ -89,7 +89,10 @@ $form["tabs"]['database'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'y',
'value' => array('mysql' => 'MySQL')
'value' => array(
'mongo' => 'MongoDB',
'mysql' => 'MySQL'
)
),
'database_name' => array (
'datatype' => 'VARCHAR',
......@@ -174,4 +177,4 @@ $form["tabs"]['database'] = array (
);
?>
\ No newline at end of file
?>
......@@ -29,7 +29,7 @@
Hint:
The ID field of the database table is not part of the datafield definition.
The ID field must be always auto incement (int or bigint).
Search:
- searchable = 1 or searchable = 2 include the field in the search
- searchable = 1: this field will be the title of the search result
......@@ -108,6 +108,14 @@ $form["tabs"]['database_user'] = array (
'width' => '30',
'maxlength' => '255'
),
'database_password_mongo' => array (
'datatype' => 'VARCHAR',
'formtype' => 'PASSWORD',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
##################################
# ENDE Datatable fields
##################################
......
......@@ -2,6 +2,7 @@
$wb['list_head_txt'] = 'Datenbank';
$wb['active_txt'] = 'Aktiv';
$wb['remote_access_txt'] = 'Remotezugriff';
$wb['type_txt'] = 'Typ';
$wb['server_id_txt'] = 'Server';
$wb['database_user_txt'] = 'Datenbank Benutzer';
$wb['database_name_txt'] = 'Datenbankname';
......
......@@ -2,6 +2,7 @@
$wb['list_head_txt'] = 'Datenbank';
$wb['active_txt'] = 'Aktiv';
$wb['remote_access_txt'] = 'Remotezugriff';
$wb['type_txt'] = 'Typ';
$wb['server_id_txt'] = 'Server';
$wb['database_name_txt'] = 'Datenbankname';
$wb['add_new_record_txt'] = 'Neue Datenbank hinzufügen';
......
......@@ -10,6 +10,7 @@ $wb['restore_info_txt'] = 'Die Wiederherstellung des Backups hat begonnen. Diese
$wb['restore_confirm_txt'] = 'Die Wiederherstellung wird existierende Dateien in Ihrer Website überschreiben. Möchten Sie dieses Backup wirklich zurückspielen?';
$wb['download_pending_txt'] = 'Es liegt bereits ein Backup Download Job an.';
$wb['restore_pending_txt'] = 'Es liegt bereits ein Backup Wiederherstellungs Job an.';
$wb['backup_type_mongodb'] = 'MongoDB Datenbank';
$wb['backup_type_mysql'] = 'MySQL Datenbank';
$wb['backup_type_web'] = 'Webseiten Dateien';
?>
......@@ -2,9 +2,10 @@
$wb["list_head_txt"] = 'Database';
$wb["active_txt"] = 'Active';
$wb["remote_access_txt"] = 'Remote Access';
$wb['type_txt'] = 'Type';
$wb["server_id_txt"] = 'Server';
$wb["database_user_txt"] = 'Database user';
$wb["database_name_txt"] = 'Database name';
$wb["add_new_record_txt"] = 'Add new Database';
$wb["sys_groupid_txt"] = 'Client';
?>
\ No newline at end of file
?>
......@@ -2,8 +2,9 @@
$wb["list_head_txt"] = 'Database';
$wb["active_txt"] = 'Active';
$wb["remote_access_txt"] = 'Remote Access';
$wb['type_txt'] = 'Type';
$wb["server_id_txt"] = 'Server';
$wb["database_user_txt"] = 'Database user';
$wb["database_name_txt"] = 'Database name';
$wb["add_new_record_txt"] = 'Add new Database';
?>
\ No newline at end of file
?>
......@@ -11,7 +11,8 @@ $wb['restore_info_txt'] = 'Restore of the backup has been started. This action t
$wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?';
$wb['download_pending_txt'] = 'There is already a pending backup download job.';
$wb['restore_pending_txt'] = 'There is already a pending backup restore job.';
$wb['backup_type_mysql'] = 'MySQL Database';
$wb['backup_type_web'] = 'Website files';
?>
$wb['backup_type_mongodb'] = 'MongoDB Database';
$wb['backup_type_mysql'] = 'MySQL Database';
$wb['backup_type_web'] = 'Website files';
?>
......@@ -70,6 +70,19 @@ $liste["item"][] = array( 'field' => "remote_access",
'width' => "",
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>",'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>"));
$liste["item"][] = array( 'field' => "type",
'datatype' => "VARCHAR",
'formtype' => "SELECT",
'op' => "=",
'prefix' => "",
'suffix' => "",
'width' => "",
'value' => array(
'mongo' => "MongoDB",
'mysql' => "MySQL"
)
);
if($_SESSION['s']['user']['typ'] == 'admin') {
$liste["item"][] = array( 'field' => "sys_groupid",
'datatype' => "INTEGER",
......@@ -123,4 +136,4 @@ $liste["item"][] = array( 'field' => "database_name",
'width' => "",
'value' => "");
?>
\ No newline at end of file
?>
......@@ -19,6 +19,7 @@
<tr class="caption">
<th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th>
<th class="tbl_col_remote_access" scope="col"><tmpl_var name="remote_access_txt"></th>
<th class="tbl_col_type" scope="col"><tmpl_var name="type_txt"></th>
<th class="tbl_col_sys_groupid" scope="col"><tmpl_var name="sys_groupid_txt"></th>
<th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th>
<th class="tbl_col_database_user_id" scope="col"><tmpl_var name="database_user_txt"></th>
......@@ -28,6 +29,7 @@
<tr class="filter">
<td class="tbl_col_active"><select name="search_active">{tmpl_var name='search_active'}</select></td>
<td class="tbl_col_remote_access"><select name="search_remote_access">{tmpl_var name='search_remote_access'}</select></td>
<td class="tbl_col_type"><select name="search_type">{tmpl_var name='search_type'}</select></td>
<td class="tbl_col_sys_groupid"><select name="search_sys_groupid">{tmpl_var name='search_sys_groupid'}</select></td>
<td class="tbl_col_server_id"><select name="search_server_id">{tmpl_var name='search_server_id'}</select></td>
<td class="tbl_col_database_user"><select name="search_database_user_id">{tmpl_var name='search_database_user_id'}</select></td>
......@@ -42,6 +44,7 @@
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
<td class="tbl_col_active"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</a></td>
<td class="tbl_col_remote_access"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="remote_access"}</a></td>
<td class="tbl_col_type"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="type"}</a></td>
<td class="tbl_col_sys_groupid"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="sys_groupid"}</a></td>
<td class="tbl_col_server_id"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a></td>
<td class="tbl_col_database_user"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="database_user_id"}</a></td>
......@@ -51,23 +54,23 @@
<a class="button icons16 icoDbAdmin" href="sites/database_phpmyadmin.php?id={tmpl_var name='id'}" target="phpmyadmin"><span>{tmpl_var name='admin_txt'}</span></a>
</tmpl_if>
<a class="button icons16 icoEdit" href="javascript: loadContent('sites/database_edit.php?id={tmpl_var name='id'}');"><span>{tmpl_var name='edit_txt'}</span></a>
<a class="button icons16 icoDelete" href="javascript: del_record('sites/database_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
<a class="button icons16 icoDelete" href="javascript: del_record('sites/database_del.php?id={tmpl_var name='id'}&amp;phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
</td>
</tr>
</tmpl_loop>
<tmpl_unless name="records">
<tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
<td colspan="7">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
<td colspan="8">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
</tr>
</tmpl_unless>
</tbody>
<tfoot>
<tr>
<td class="tbl_footer tbl_paging" colspan="7"><tmpl_var name="paging"></td>
<td class="tbl_footer tbl_paging" colspan="8"><tmpl_var name="paging"></td>
</tr>
</tfoot>
</table>
</fieldset>
</div>
</div>
\ No newline at end of file
</div>
......@@ -36,6 +36,7 @@
<tr class="caption">
<th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th>
<th class="tbl_col_remote_access" scope="col"><tmpl_var name="remote_access_txt"></th>
<th class="tbl_col_type" scope="col"><tmpl_var name="type_txt"></th>
<th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th>
<th class="tbl_col_database_user_id" scope="col"><tmpl_var name="database_user_txt"></th>
<th class="tbl_col_database_name" scope="col"><tmpl_var name="database_name_txt"></th>
......@@ -44,6 +45,7 @@
<tr class="filter">
<td class="tbl_col_active"><select name="search_active">{tmpl_var name='search_active'}</select></td>
<td class="tbl_col_remote_access"><select name="search_remote_access">{tmpl_var name='search_remote_access'}</select></td>
<td class="tbl_col_type"><select name="search_type">{tmpl_var name='search_type'}</select></td>
<td class="tbl_col_server_id"><select name="search_server_id">{tmpl_var name='search_server_id'}</select></td>
<td class="tbl_col_database_user_id"><select name="search_database_user_id">{tmpl_var name='search_database_user_id'}</select></td>
<td class="tbl_col_database_name"><input type="text" name="search_database_name" value="{tmpl_var name='search_database_name'}"/></td>
......@@ -57,6 +59,7 @@
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
<td class="tbl_col_active"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</a></td>
<td class="tbl_col_remote_access"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="remote_access"}</a></td>
<td class="tbl_col_type"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="type"}</a></td>
<td class="tbl_col_server_id"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a></td>
<td class="tbl_col_database_user"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="database_user_id"}</a></td>
<td class="tbl_col_database_name"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="database_name"}</a></td>
......@@ -65,23 +68,23 @@
<a class="button icons16 icoDbAdmin" href="sites/database_phpmyadmin.php?id={tmpl_var name='id'}" target="phpmyadmin"><span>{tmpl_var name='admin_txt'}</span></a>
</tmpl_if>
<a class="button icons16 icoEdit" href="javascript: loadContent('sites/database_edit.php?id={tmpl_var name='id'}');"><span>{tmpl_var name='edit_txt'}</span></a>
<a class="button icons16 icoDelete" href="javascript: del_record('sites/database_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
<a class="button icons16 icoDelete" href="javascript: del_record('sites/database_del.php?id={tmpl_var name='id'}&amp;phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
</td>