Implemented:
- Show status messages to clients as long as the datalog is not processed (changes pending...)
- missing:
- template code in templates other than database list
- language entries other than web_database, web_domain, web_database_user
| | |
| | | $this->tpl->setVar('app_title', $this->_conf['app_title']); |
| | | if(isset($_SESSION['s']['user'])) { |
| | | $this->tpl->setVar('app_version', $this->_conf['app_version']); |
| | | // get pending datalog changes |
| | | $datalog = $this->db->datalogStatus(); |
| | | $this->tpl->setVar('datalog_changes_txt', $this->lng('datalog_changes_txt')); |
| | | $this->tpl->setVar('datalog_changes_end_txt', $this->lng('datalog_changes_end_txt')); |
| | | $this->tpl->setVar('datalog_changes_count', $datalog['count']); |
| | | $this->tpl->setLoop('datalog_changes', $datalog['entries']); |
| | | } else { |
| | | $this->tpl->setVar('app_version', ''); |
| | | } |
| | |
| | | |
| | | return true; |
| | | } |
| | | |
| | | //* get the current datalog status for the specified login (or currently logged in user) |
| | | public function datalogStatus($login = '') { |
| | | global $app; |
| | | |
| | | $return = array('count' => 0, 'entries' => array()); |
| | | if($_SESSION['s']['user']['typ'] == 'admin') return $return; // these information should not be displayed to admin users |
| | | |
| | | if($login == '' && isset($_SESSION['s']['user'])) { |
| | | $login = $_SESSION['s']['user']['username']; |
| | | } |
| | | |
| | | $result = $this->queryAllRecords("SELECT COUNT( * ) AS cnt, sys_datalog.action, sys_datalog.dbtable FROM sys_datalog, server WHERE server.server_id = sys_datalog.server_id AND sys_datalog.user = '" . $this->quote($login) . "' AND sys_datalog.datalog_id > server.updated GROUP BY sys_datalog.dbtable, sys_datalog.action"); |
| | | foreach($result as $row) { |
| | | if(!$row['dbtable']) continue; |
| | | $return['entries'][] = array('table' => $row['dbtable'], 'action' => $row['action'], 'count' => $row['cnt'], 'text' => $app->lng('datalog_status_' . $row['action'] . '_' . $row['dbtable'])); |
| | | $return['count'] += 1; |
| | | } |
| | | unset($result); |
| | | |
| | | return $return; |
| | | } |
| | | |
| | | |
| | | public function freeResult($query) |
| | |
| | | $wb['globalsearch_suggestions_text_txt'] = "Vorschläge"; |
| | | $wb['global_tabchange_warning_txt'] = "Die Eingaben in diesem Tab werden gespeichert, wenn Sie OK klicken, bei Abbrechen werden die Änderungen verworfen."; |
| | | $wb['global_tabchange_discard_txt'] = "Achtung, Sie haben ungespeicherte Änderungen in diesem Tab. Wenn Sie fortfahren werden die Änderungen verworfen."; |
| | | |
| | | $wb['datalog_changes_txt'] = 'Folgende Änderungen wurden noch nicht auf alle Server übernommen:'; |
| | | $wb['datalog_changes_end_txt'] = 'Die Übernahme der Änderungen kann bis zu 1 Minute in Anspruch nehmen.'; |
| | | $wb['datalog_status_i_web_database'] = 'Neue Datenbank anlegen'; |
| | | $wb['datalog_status_u_web_database'] = 'Datenbank ändern'; |
| | | $wb['datalog_status_d_web_database'] = 'Datenbank löschen'; |
| | | $wb['datalog_status_i_web_database_user'] = 'Datenbank-Benutzer für Datenbank anlegen'; |
| | | $wb['datalog_status_u_web_database_user'] = 'Datenbank-Benutzer ändern'; |
| | | $wb['datalog_status_d_web_database_user'] = 'Datenbank-Benutzer löschen'; |
| | | $wb['datalog_status_i_web_domain'] = 'Neue Webseite anlegen'; |
| | | $wb['datalog_status_u_web_domain'] = 'Webseiten-Einstellungen ändern'; |
| | | $wb['datalog_status_d_web_domain'] = 'Webseite löschen'; |
| | | |
| | | ?> |
| | | |
| | |
| | | $wb['globalsearch_suggestions_text_txt'] = "Suggestions"; |
| | | $wb['global_tabchange_warning_txt'] = 'Changed data in this tab will be changed if you press OK. On cancel they will be discarded.'; |
| | | $wb['global_tabchange_discard_txt'] = 'You have unsaved changes in this tab. Changes will be discarded if you continue.'; |
| | | |
| | | $wb['datalog_changes_txt'] = 'The following changes are not yet populated to all servers:'; |
| | | $wb['datalog_changes_end_txt'] = 'Storing updates can take up to one minute. Please be patient.'; |
| | | $wb['datalog_status_i_web_database'] = 'Create new database'; |
| | | $wb['datalog_status_u_web_database'] = 'Update database'; |
| | | $wb['datalog_status_d_web_database'] = 'Delete database'; |
| | | $wb['datalog_status_i_web_database_user'] = 'Create database user for database'; |
| | | $wb['datalog_status_u_web_database_user'] = 'Update database user'; |
| | | $wb['datalog_status_d_web_database_user'] = 'Delete database user'; |
| | | $wb['datalog_status_i_web_domain'] = 'Create new website'; |
| | | $wb['datalog_status_u_web_domain'] = 'Update website settings'; |
| | | $wb['datalog_status_d_web_domain'] = 'Delete website'; |
| | | ?> |
| | |
| | | <div class="panel panel_list_database"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <tmpl_if name='datalog_changes_count' op='>' value='0'> |
| | | <div> |
| | | <div class="systemmonitor-state state-info"> |
| | | <div class="status"></div> |
| | | <div class="statusMsg"> |
| | | {tmpl_var name="datalog_changes_txt"} |
| | | <ul> |
| | | <tmpl_loop name="datalog_changes"> |
| | | <li><strong>{tmpl_var name="text"}:</strong> {tmpl_var name="count"}</li> |
| | | </tmpl_loop> |
| | | </ul> |
| | | {tmpl_var name="datalog_changes_end_txt"} |
| | | </div> |
| | | </div><br /> |
| | | </div> |
| | | </tmpl_if> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons"> |
| | | <button class="button iconstxt icoAdd" type="button" onclick="loadContent('sites/database_edit.php');"> |
| | |
| | | .ui-combobox-toggle { position: absolute !important; top: 0; bottom: 0; margin-left: -1px; padding: 1px !important; background: none repeat scroll 0 0 #FFFFFF !important; border: 1px solid #DFDFDF !important;} |
| | | .ui-combobox-input { background: none repeat scroll 0 0 #FFFFFF !important; border: 1px solid #DFDFDF !important; padding: 1px; font-weight: normal !important; } |
| | | .panel_install_package .ui-combobox { float: left; } |
| | | .clear-float { clear: both; } |