change admin_configfiles to handle the new XML-configs instead of the old php-arrays

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2015-02-09 13:54:55 +01:00
parent c3b45a62ca
commit 4bd91a811d
15 changed files with 250 additions and 217 deletions

View File

@@ -2,7 +2,6 @@
/** /**
* This file is part of the Froxlor project. * This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors). * Copyright (c) 2010 the Froxlor Team (see authors).
* *
* For the full copyright and license information, please view the COPYING * For the full copyright and license information, please view the COPYING
@@ -10,174 +9,182 @@
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt * COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* *
* @copyright (c) the authors * @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-) * @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel * @package Panel
* *
* @since 0.9.34
*/ */
define('AREA', 'admin'); define('AREA', 'admin');
$need_db_sql_data = true;
require './lib/init.php'; require './lib/init.php';
require './lib/configfiles_index.inc.php';
$distribution = ''; if ($userinfo['change_serversettings'] == '1') {
$distributions_select = '';
$service = ''; $replace_arr = Array(
$services_select = ''; '<SQL_UNPRIVILEGED_USER>' => $sql['user'],
$daemon = ''; '<SQL_UNPRIVILEGED_PASSWORD>' => 'MYSQL_PASSWORD',
$daemons_select = ''; '<SQL_DB>' => $sql['db'],
'<SQL_HOST>' => $sql['host'],
if($userinfo['change_serversettings'] == '1') '<SERVERNAME>' => Settings::Get('system.hostname'),
{ '<SERVERIP>' => Settings::Get('system.ipaddress'),
if(isset($_GET['distribution']) '<NAMESERVERS>' => Settings::Get('system.nameservers'),
&& $_GET['distribution'] != '' '<VIRTUAL_MAILBOX_BASE>' => Settings::Get('system.vmail_homedir'),
&& isset($configfiles[$_GET['distribution']]) '<VIRTUAL_UID_MAPS>' => Settings::Get('system.vmail_uid'),
&& is_array($configfiles[$_GET['distribution']])) '<VIRTUAL_GID_MAPS>' => Settings::Get('system.vmail_gid'),
{ '<SSLPROTOCOLS>' => (Settings::Get('system.use_ssl') == '1') ? 'imaps pop3s' : '',
$distribution = $_GET['distribution']; '<CUSTOMER_TMP>' => (Settings::Get('system.mod_fcgid_tmpdir') != '') ? makeCorrectDir(Settings::Get('system.mod_fcgid_tmpdir')) : '/tmp/',
'<BASE_PATH>' => makeCorrectDir(FROXLOR_INSTALL_DIR),
if(isset($_GET['service']) '<BIND_CONFIG_PATH>' => makeCorrectDir(Settings::Get('system.bindconf_directory')),
&& $_GET['service'] != '' '<WEBSERVER_RELOAD_CMD>' => Settings::Get('system.apachereload_command'),
&& isset($configfiles[$distribution]['services'][$_GET['service']]) '<CUSTOMER_LOGS>' => makeCorrectDir(Settings::Get('system.logfiles_directory')),
&& is_array($configfiles[$distribution]['services'][$_GET['service']])) '<FPM_IPCDIR>' => makeCorrectDir(Settings::Get('phpfpm.fastcgi_ipcdir')),
{ '<WEBSERVER_GROUP>' => Settings::Get('system.httpgroup')
$service = $_GET['service']; );
if(isset($_GET['daemon']) // get distro from URL param
&& $_GET['daemon'] != '' $distribution = isset($_GET['distribution']) ? $_GET['distribution'] : "";
&& isset($configfiles[$distribution]['services'][$service]['daemons'][$_GET['daemon']]) $service = isset($_GET['service']) ? $_GET['service'] : "";
&& is_array($configfiles[$distribution]['services'][$service]['daemons'][$_GET['daemon']])) $daemon = isset($_GET['daemon']) ? $_GET['daemon'] : "";
{ $distributions_select = "";
$daemon = $_GET['daemon']; $services_select = "";
} $daemons_select = "";
else
{ $configfiles = "";
foreach($configfiles[$distribution]['services'][$service]['daemons'] as $daemon_name => $daemon_details) $services = "";
{ $daemons = "";
$daemons_select.= makeoption($daemon_details['label'], $daemon_name);
} $config_dir = makeCorrectDir(FROXLOR_INSTALL_DIR . '/lib/configfiles/');
}
} if ($distribution != "") {
else // create configparser object
{ $configfiles = new ConfigParser($config_dir . '/' . $distribution . ".xml");
foreach($configfiles[$distribution]['services'] as $service_name => $service_details)
{ // get distro-info
$services_select.= makeoption($service_details['label'], $service_name); $dist_display = getCompleteDistroName($configfiles);
}
} // get all the services from the distro
} $services = $configfiles->getServices();
else
{ if ($service != "") {
foreach($configfiles as $distribution_name => $distribution_details)
{ $daemons = $services[$service]->getDaemons();
$distributions_select.= makeoption($distribution_details['label'], $distribution_name);
} if ($daemon == "") {
} foreach ($daemons as $di => $dd) {
$daemons_select .= makeoption($dd->title, $di);
if($distribution != '' }
&& $service != '' }
&& $daemon != '') } else {
{ foreach ($services as $si => $sd) {
$replace_arr = Array( $services_select .= makeoption($sd->title, $si);
'<SQL_UNPRIVILEGED_USER>' => $sql['user'], }
'<SQL_UNPRIVILEGED_PASSWORD>' => 'MYSQL_PASSWORD', }
'<SQL_DB>' => $sql['db'], } else {
'<SQL_HOST>' => $sql['host'],
'<SERVERNAME>' => Settings::Get('system.hostname'), // show list of available distro's
'<SERVERIP>' => Settings::Get('system.ipaddress'), $distros = glob($config_dir . '*.xml');
'<NAMESERVERS>' => Settings::Get('system.nameservers'), // read in all the distros
'<VIRTUAL_MAILBOX_BASE>' => Settings::Get('system.vmail_homedir'), foreach ($distros as $_distribution) {
'<VIRTUAL_UID_MAPS>' => Settings::Get('system.vmail_uid'), // get configparser object
'<VIRTUAL_GID_MAPS>' => Settings::Get('system.vmail_gid'), $dist = new ConfigParser($_distribution);
'<SSLPROTOCOLS>' => (Settings::Get('system.use_ssl') == '1') ? 'imaps pop3s' : '', // get distro-info
'<CUSTOMER_TMP>' => (Settings::Get('system.mod_fcgid_tmpdir') != '') ? makeCorrectDir(Settings::Get('system.mod_fcgid_tmpdir')) : '/tmp/', $dist_display = getCompleteDistroName($dist);
'<BASE_PATH>' => makeCorrectDir(FROXLOR_INSTALL_DIR), // create select-box-option
'<BIND_CONFIG_PATH>' => makeCorrectDir(Settings::Get('system.bindconf_directory')), $distributions_select .= makeoption($dist_display, str_replace(".xml", "", strtolower(basename($_distribution))));
'<WEBSERVER_RELOAD_CMD>' => Settings::Get('system.apachereload_command'), }
'<CUSTOMER_LOGS>' => makeCorrectDir(Settings::Get('system.logfiles_directory')), }
'<FPM_IPCDIR>' => makeCorrectDir(Settings::Get('phpfpm.fastcgi_ipcdir')),
'<WEBSERVER_GROUP>' => Settings::Get('system.httpgroup') if ($distribution != "" && $service != "" && $daemon != "") {
);
$files = ''; $confarr = $daemons[$daemon]->getConfig();
$configpage = '';
foreach($configfiles[$distribution]['services'][$service]['daemons'][$daemon] as $action => $value) $configpage = '';
{
if(substr($action, 0, 8) == 'commands') $commands_pre = "";
{ $commands_file = "";
$commands = ''; $commands_post = "";
if(is_array($value)) $lasttype = '';
{ $commands = '';
$commands = implode("\n", $value); foreach ($confarr as $idx => $action) {
$commands = str_replace("\n\n", "\n", $commands); if ($lasttype != '' && $lasttype != $action['type']) {
eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_commands") . "\";");
if($commands != '') $lasttype = '';
{ $commands = '';
eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_commands") . "\";"); }
} switch ($action['type']) {
} case "install":
} $commands .= $action['content'] . "\n";
elseif(substr($action, 0, 5) == 'files') $lasttype = "install";
{ break;
$files = ''; case "command":
$commands .= $action['content'] . "\n";
if(is_array($value)) $lasttype = "command";
{ break;
while(list($filename, $realname) = each($value)) case "file":
{ if (array_key_exists('content', $action)) {
$file_content = file_get_contents('./templates/misc/configfiles/' . $distribution . '/' . $daemon . '/' . $filename); $commands_file = getFileContentContainer($action['content'], $replace_arr, $action['name']);
$file_content = strtr($file_content, $replace_arr); } elseif (array_key_exists('subcommands', $action)) {
$file_content = htmlspecialchars($file_content); foreach ($action['subcommands'] as $fileaction) {
$numbrows = count(explode("\n", $file_content)); if (array_key_exists('execute', $fileaction) && $fileaction['execute'] == "pre") {
eval("\$files.=\"" . getTemplate("configfiles/configfiles_file") . "\";"); $commands_pre .= $fileaction['content'] . "\n";
} } elseif (array_key_exists('execute', $fileaction) && $fileaction['execute'] == "post") {
$commands_post .= $fileaction['content'] . "\n";
eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_files") . "\";"); } elseif ($fileaction['type'] == 'file') {
} $commands_file = getFileContentContainer($fileaction['content'], $replace_arr, $action['name']);
} }
} }
}
if(isset($configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart']) $realname = $action['name'];
&& is_array($configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart'])) $commands = trim($commands_pre);
{ if ($commands != "") {
$restart = implode("\n", $configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart']); eval("\$commands_pre=\"" . getTemplate("configfiles/configfiles_commands") . "\";");
} }
else $commands = trim($commands_post);
{ if ($commands != "") {
$restart = ''; eval("\$commands_post=\"" . getTemplate("configfiles/configfiles_commands") . "\";");
} }
eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_subfileblock") . "\";");
eval("echo \"" . getTemplate("configfiles/configfiles") . "\";"); $commands_pre = '';
} $commands_post = '';
elseif($page == 'overview') break;
{ }
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_configfiles"); }
$distributions = ''; $commands = trim($commands);
foreach($configfiles as $distribution_name => $distribution_details) if ($commands != '') {
{ eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_commands") . "\";");
$services = ''; }
foreach($distribution_details['services'] as $service_name => $service_details) eval("echo \"" . getTemplate("configfiles/configfiles") . "\";");
{ } else {
$daemons = ''; eval("echo \"" . getTemplate("configfiles/wizard") . "\";");
foreach($service_details['daemons'] as $daemon_name => $daemon_details) }
{ } else {
eval("\$daemons.=\"" . getTemplate("configfiles/choose_daemon") . "\";"); die('not allowed to see this page');
} // redirect or similar here
eval("\$services.=\"" . getTemplate("configfiles/choose_service") . "\";");
}
eval("\$distributions.=\"" . getTemplate("configfiles/choose_distribution") . "\";");
}
eval("echo \"" . getTemplate("configfiles/choose") . "\";");
}
else
{
eval("echo \"" . getTemplate("configfiles/wizard") . "\";");
}
} }
?> // helper functions
function getFileContentContainer($file_content, &$replace_arr, $realname)
{
$files = "";
if ($file_content != '') {
$file_content = strtr($file_content, $replace_arr);
$file_content = htmlspecialchars($file_content);
$numbrows = count(explode("\n", $file_content));
eval("\$files=\"" . getTemplate("configfiles/configfiles_file") . "\";");
}
return $files;
}
function getCompleteDistroName($cparser)
{
// get distro-info
$dist_display = $cparser->distributionName;
if ($cparser->distributionVersion != '') {
$dist_display .= " (" . $cparser->distributionVersion . ")";
}
if ($cparser->deprecated) {
$dist_display .= " [deprecated]";
}
return $dist_display;
}

View File

@@ -269,9 +269,6 @@ $lng['admin']['deactivated_user'] = 'Gebruiker deactiveren';
$lng['admin']['sendpassword'] = 'Verstuur wachtwoord'; $lng['admin']['sendpassword'] = 'Verstuur wachtwoord';
$lng['admin']['ownvhostsettings'] = 'Eigen vHost-Instellingen'; $lng['admin']['ownvhostsettings'] = 'Eigen vHost-Instellingen';
$lng['admin']['configfiles']['serverconfiguration'] = 'Configuratie'; $lng['admin']['configfiles']['serverconfiguration'] = 'Configuratie';
$lng['admin']['configfiles']['files'] = '<b>Configuratiebestanden:</b> Wijzig de volgende bestanden of maak ze aan met<br />de volgende inhoud als u dit nog niet gedaan heeft.<br /><b>Let Op:</b> Het MySQL-wachtwoord is niet aangepast vanwege beveiligings overwegingen.<br />Vervang "MYSQL_PASSWORD" zelf. Als u uw MYSQl wachtwoord vergeten bent<br />kunt u het terugvinden in "lib/userdata.inc.php".';
$lng['admin']['configfiles']['commands'] = '<b>Commando\'s:</b> Start de volgende commando\'s in een shell.';
$lng['admin']['configfiles']['restart'] = '<b>Herstarten:</b> Start de volgende commando\'s in een shell zodat de configuratie opnieuw geladen wordt.';
$lng['admin']['templates']['templates'] = 'Sjablonen'; $lng['admin']['templates']['templates'] = 'Sjablonen';
$lng['admin']['templates']['template_add'] = 'Maak sjabloon'; $lng['admin']['templates']['template_add'] = 'Maak sjabloon';
$lng['admin']['templates']['template_edit'] = 'Bewerk sjabloon'; $lng['admin']['templates']['template_edit'] = 'Bewerk sjabloon';

View File

@@ -300,9 +300,6 @@ $lng['admin']['deactivated_user'] = 'Deactivate user';
$lng['admin']['sendpassword'] = 'Send password'; $lng['admin']['sendpassword'] = 'Send password';
$lng['admin']['ownvhostsettings'] = 'Own vHost-settings'; $lng['admin']['ownvhostsettings'] = 'Own vHost-settings';
$lng['admin']['configfiles']['serverconfiguration'] = 'Configuration'; $lng['admin']['configfiles']['serverconfiguration'] = 'Configuration';
$lng['admin']['configfiles']['files'] = '<b>Configfiles:</b> Please change the following files or create them with<br />the following content if they do not exist.<br /><b>Please note:</b> The MySQL-password has not been replaced for security reasons.<br />Please replace "MYSQL_PASSWORD" on your own. If you forgot your MySQL-password<br />you\'ll find it in "lib/userdata.inc.php".';
$lng['admin']['configfiles']['commands'] = '<b>Commands:</b> Please execute the following commands in a shell.';
$lng['admin']['configfiles']['restart'] = '<b>Restart:</b> Please execute the following commands in a shell in order to reload the new configuration.';
$lng['admin']['templates']['templates'] = 'Email-templates'; $lng['admin']['templates']['templates'] = 'Email-templates';
$lng['admin']['templates']['template_add'] = 'Add template'; $lng['admin']['templates']['template_add'] = 'Add template';
$lng['admin']['templates']['template_edit'] = 'Edit template'; $lng['admin']['templates']['template_edit'] = 'Edit template';
@@ -1839,3 +1836,8 @@ $lng['usersettings']['custom_notes']['show'] = 'Show your notes on the dashboard
$lng['serversettings']['system_send_cron_errors']['title'] = 'Send cron-errors to froxlor-admin via e-mail'; $lng['serversettings']['system_send_cron_errors']['title'] = 'Send cron-errors to froxlor-admin via e-mail';
$lng['serversettings']['system_send_cron_errors']['description'] = 'Chose whether you want to receive an e-mail on cronjob errors. Keep in mind that this can lead to an e-mail being sent every 5 minutes depending on the error and your cronjob settings.'; $lng['serversettings']['system_send_cron_errors']['description'] = 'Chose whether you want to receive an e-mail on cronjob errors. Keep in mind that this can lead to an e-mail being sent every 5 minutes depending on the error and your cronjob settings.';
$lng['error']['fcgidandphpfpmnogoodtogether'] = 'FCGID and PHP-FPM cannot be activated at the same time'; $lng['error']['fcgidandphpfpmnogoodtogether'] = 'FCGID and PHP-FPM cannot be activated at the same time';
// Added in Froxlor 0.9.34
$lng['admin']['configfiles']['legend'] = 'You are about to configure a service/daemon. The following legend explains the nomenclature.';
$lng['admin']['configfiles']['commands'] = '<span class="red">Commands:</span> These commands are to be executed line by line as root-user in a shell.<br>It is safe to copy the whole block and paste it into the shell.';
$lng['admin']['configfiles']['files'] = '<span class="red">Configfiles:</span> This is an example of the contents of a configuration file.<br>The commands before these textfields should open an editor with the target file.<br>Just copy and paste the contents into the editor and save the file.<br><br><span class="red">Please note:</span> The MySQL-password has not been replaced for security reasons. Please replace "MYSQL_PASSWORD" on your own. If you forgot your MySQL-password you\'ll find it in "lib/userdata.inc.php"';

View File

@@ -302,9 +302,6 @@ $lng['admin']['deactivated_user'] = 'Désactiver l\'utilisateur';
$lng['admin']['sendpassword'] = 'Envoyer le mot de passe'; $lng['admin']['sendpassword'] = 'Envoyer le mot de passe';
$lng['admin']['ownvhostsettings'] = 'Configuration spéciale du vHost'; $lng['admin']['ownvhostsettings'] = 'Configuration spéciale du vHost';
$lng['admin']['configfiles']['serverconfiguration'] = 'Exemple de configuration'; $lng['admin']['configfiles']['serverconfiguration'] = 'Exemple de configuration';
$lng['admin']['configfiles']['files'] = '<b>Fichiers de configuration :</b> Veuillez créer ou modifier les fichiers suivants avec le contenu ci-dessous.<br /><br /><b>IMPORTANT :</b> Le mot de passe MySQL n\'est pas donné dans les informations ci-dessous<br />pour des raisons de sécurité. Veuillez donc remplacer les "<b>MYSQL_PASSWORD</b>"<br />manuellement avec le mot de passe correspondant. En cas d\'oubli, vous pouvez le retrouver dans<br />le fichier "<b>lib/userdata.inc.php</b>".';
$lng['admin']['configfiles']['commands'] = '<b>Commandes :</b> Veuillez exécuter les commandes ci-dessous dans le shell.';
$lng['admin']['configfiles']['restart'] = '<b>Redémarrage :</b> Veuillez exécuter les commandes ci-dessous pour<br />prendre en compte les changements.';
$lng['admin']['templates']['templates'] = 'Modèles'; $lng['admin']['templates']['templates'] = 'Modèles';
$lng['admin']['templates']['template_add'] = 'Ajouter un modèle'; $lng['admin']['templates']['template_add'] = 'Ajouter un modèle';
$lng['admin']['templates']['template_edit'] = 'Modifier un modèle'; $lng['admin']['templates']['template_edit'] = 'Modifier un modèle';

View File

@@ -299,9 +299,6 @@ $lng['admin']['deactivated_user'] = 'Benutzer sperren';
$lng['admin']['sendpassword'] = 'Passwort zusenden'; $lng['admin']['sendpassword'] = 'Passwort zusenden';
$lng['admin']['ownvhostsettings'] = 'Eigene vHost-Einstellungen'; $lng['admin']['ownvhostsettings'] = 'Eigene vHost-Einstellungen';
$lng['admin']['configfiles']['serverconfiguration'] = 'Konfiguration'; $lng['admin']['configfiles']['serverconfiguration'] = 'Konfiguration';
$lng['admin']['configfiles']['files'] = '<strong>Konfigurationsdateien:</strong> Bitte ändern Sie die entsprechenden Konfigurationsdateien oder legen Sie mit dem folgenden Inhalt neu an, falls sie nicht existieren.<br /><strong>Beachten Sie:</strong> Das MySQL-Passwort wurde aus Sicherheitsgründen nicht ersetzt. Bitte ersetzen Sie "MYSQL_PASSWORD" manuell durch das entsprechende Passwort. Falls Sie es vergessen haben sollten, finden Sie es in der Datei "lib/userdata.inc.php".';
$lng['admin']['configfiles']['commands'] = '<strong>Kommandos:</strong> Bitte führen Sie die folgenden Kommandos in einer Shell aus.';
$lng['admin']['configfiles']['restart'] = '<strong>Neustart:</strong> Bitte führen Sie die folgenden Kommandos zum Neuladen der Konfigurationsdateien in einer Shell aus.';
$lng['admin']['templates']['templates'] = 'E-Mail-Vorlagen'; $lng['admin']['templates']['templates'] = 'E-Mail-Vorlagen';
$lng['admin']['templates']['template_add'] = 'Vorlage hinzufügen'; $lng['admin']['templates']['template_add'] = 'Vorlage hinzufügen';
$lng['admin']['templates']['template_edit'] = 'Vorlage bearbeiten'; $lng['admin']['templates']['template_edit'] = 'Vorlage bearbeiten';
@@ -1566,3 +1563,8 @@ $lng['usersettings']['custom_notes']['show'] = 'Zeige die Notizen auf dem Dashbo
$lng['serversettings']['system_send_cron_errors']['title'] = 'Sende Cron-Fehler via E-Mail an den Froxlor-Admin'; $lng['serversettings']['system_send_cron_errors']['title'] = 'Sende Cron-Fehler via E-Mail an den Froxlor-Admin';
$lng['serversettings']['system_send_cron_errors']['description'] = 'Gib an, ob bei einem Cron-Fehler eine E-Mail versendet werden soll. Beachte das es je nach Fehler und Cronjob-Einstellungen dazu kommen kann, dass diese E-Mail alle 5 Minuten gesendet wird.'; $lng['serversettings']['system_send_cron_errors']['description'] = 'Gib an, ob bei einem Cron-Fehler eine E-Mail versendet werden soll. Beachte das es je nach Fehler und Cronjob-Einstellungen dazu kommen kann, dass diese E-Mail alle 5 Minuten gesendet wird.';
$lng['error']['fcgidandphpfpmnogoodtogether'] = 'FCGID und PHP-FPM können nicht gleichzeitig aktiviert werden.'; $lng['error']['fcgidandphpfpmnogoodtogether'] = 'FCGID und PHP-FPM können nicht gleichzeitig aktiviert werden.';
// Added in Froxlor 0.9.34
$lng['admin']['configfiles']['legend'] = 'Du konfigurierst nun einen Service/Daemon. Die folgende Legende zeigen unsere Nomenklatur.';
$lng['admin']['configfiles']['commands'] = '<span class="red">Kommandos:</span> Die angezeigten Befehle müssen als Benutzer root in einer Shell ausgeführt werden.<br>Es kann auch problemlos der ganze Block kopiert und in die Shell eingefügt werden.';
$lng['admin']['configfiles']['files'] = '<span class="red">Konfigurationsdateien:</span> Dies ist der Inhalt einer Konfigurationsdatei.<br />Der Befehl direkt vor dem Textfeld sollte einen Editor mit der Zeildatei öffnen.<br>Der Inhalt kann nun einfach kopiert und in den Editor eingefügt und die Datei gespeichert werden.<br><br><span class="red">Beachten Sie:</span> Das MySQL-Passwort wurde aus Sicherheitsgründen nicht ersetzt. Bitte ersetzen Sie "MYSQL_PASSWORD" manuell durch das entsprechende Passwort. Falls Sie es vergessen haben sollten, finden Sie es in der Datei "lib/userdata.inc.php".';

View File

@@ -293,9 +293,6 @@ $lng['admin']['deactivated_user'] = 'Disattiva utente';
$lng['admin']['sendpassword'] = 'Invia password'; $lng['admin']['sendpassword'] = 'Invia password';
$lng['admin']['ownvhostsettings'] = 'Impostazioni vHost speciali'; $lng['admin']['ownvhostsettings'] = 'Impostazioni vHost speciali';
$lng['admin']['configfiles']['serverconfiguration'] = 'Configurazione servizi'; $lng['admin']['configfiles']['serverconfiguration'] = 'Configurazione servizi';
$lng['admin']['configfiles']['files'] = '<b>File di configurazione:</b> Per favore cambia questi file o creali<br />se non esistono, con il seguente contenuto.<br /><b>NOTA:</b> La password di MySQL non è stata rimpiazzata per ragioni di sicurezza.<br />Per favore rimpiazza "MYSQL_PASSWORD" con la password MySQL dell\'utente Froxlor. Se hai dimenticato la password per MySQL<br />la trovi in "lib/userdata.inc.php".';
$lng['admin']['configfiles']['commands'] = '<b>Comandi:</b> Per favore esegui i seguenti comandi in una shell.';
$lng['admin']['configfiles']['restart'] = '<b>Ricarica:</b> Per favore esegui i seguenti comandi (in ordine) in una shell per ricaricare la configurazione.';
$lng['admin']['templates']['templates'] = 'Template'; $lng['admin']['templates']['templates'] = 'Template';
$lng['admin']['templates']['template_add'] = 'Aggiungi template'; $lng['admin']['templates']['template_add'] = 'Aggiungi template';
$lng['admin']['templates']['template_edit'] = 'Modifica template'; $lng['admin']['templates']['template_edit'] = 'Modifica template';

View File

@@ -297,9 +297,6 @@ $lng['admin']['deactivated_user'] = 'Desativar usuário';
$lng['admin']['sendpassword'] = 'Enviar senha'; $lng['admin']['sendpassword'] = 'Enviar senha';
$lng['admin']['ownvhostsettings'] = 'Own vHost-Settings'; $lng['admin']['ownvhostsettings'] = 'Own vHost-Settings';
$lng['admin']['configfiles']['serverconfiguration'] = 'Configurações'; $lng['admin']['configfiles']['serverconfiguration'] = 'Configurações';
$lng['admin']['configfiles']['files'] = '<b>Configfiles:</b> Por favor altere os seguintes arquivos ou crie eles com<br />o seguinte conteúdo se ele não existir.<br /><b>Por favor observe:</b> A senha do MySQL não foi alterada por razões de segurança.<br />Por favor substitua "MYSQL_PASSWORD" por uma sua. Se você esqueceu a senha do MySQL<br />você pode verificar em "lib/userdata.inc.php".';
$lng['admin']['configfiles']['commands'] = '<b>Commands:</b> Por favor execute as seguintes comandos no shell.';
$lng['admin']['configfiles']['restart'] = '<b>Restart:</b> Por favor execute as seguintes comandos no shell para carregar aas novas configurações.';
$lng['admin']['templates']['templates'] = 'Templates'; $lng['admin']['templates']['templates'] = 'Templates';
$lng['admin']['templates']['template_add'] = 'Adicionar template'; $lng['admin']['templates']['template_add'] = 'Adicionar template';
$lng['admin']['templates']['template_edit'] = 'Editar template'; $lng['admin']['templates']['template_edit'] = 'Editar template';

View File

@@ -286,9 +286,6 @@ $lng['admin']['deactivated_user'] = 'Avaktivera användare';
$lng['admin']['sendpassword'] = 'Skicka lösenord'; $lng['admin']['sendpassword'] = 'Skicka lösenord';
$lng['admin']['ownvhostsettings'] = 'Egna vHost-Inställningar'; $lng['admin']['ownvhostsettings'] = 'Egna vHost-Inställningar';
$lng['admin']['configfiles']['serverconfiguration'] = 'Konfiguration'; $lng['admin']['configfiles']['serverconfiguration'] = 'Konfiguration';
$lng['admin']['configfiles']['files'] = '<b>Konfigurationsfiler:</b> Ändra eller skapa följande filer med<br />följande innehåll om de inte finns redan.<br /><b>Notera:</b> MySQL-lösenordet har inte ändrats på grund av säkerhetsskäl.<br />Du måste själv ändra lösenordet &quot;MYSQL_PASSWORD&quot; på egen hand. Om du glömt bort ditt MySQL-password<br />så kan du hitta det här &quot;lib/userdata.inc.php&quot;.';
$lng['admin']['configfiles']['commands'] = '<b>Kommandon:</b> Kör följande kommandon i ett terminalfönster.';
$lng['admin']['configfiles']['restart'] = '<b>Omstart:</b> Kör följande kommandon i ett terminalfönster för att ladda in den nya konfigurationen.';
$lng['admin']['templates']['templates'] = 'Mallar'; $lng['admin']['templates']['templates'] = 'Mallar';
$lng['admin']['templates']['template_add'] = '[Lägg till en ny mall]'; $lng['admin']['templates']['template_add'] = '[Lägg till en ny mall]';
$lng['admin']['templates']['template_edit'] = 'Ändra en befintlig mall'; $lng['admin']['templates']['template_edit'] = 'Ändra en befintlig mall';

View File

@@ -3,27 +3,38 @@ $header
<header> <header>
<h2> <h2>
<img src="templates/{$theme}/assets/img/icons/settings_big.png" alt="" />&nbsp; <img src="templates/{$theme}/assets/img/icons/settings_big.png" alt="" />&nbsp;
{$configfiles[$distribution]['label']}&nbsp;&raquo;&nbsp; {$dist_display}&nbsp;&raquo;&nbsp;
{$configfiles[$distribution]['services'][$service]['label']}&nbsp;&raquo;&nbsp; {$services[$service]->title}&nbsp;&raquo;&nbsp;
{$configfiles[$distribution]['services'][$service]['daemons'][$daemon]['label']}&nbsp; {$daemons[$daemon]->title}&nbsp;[<a href="{$linker->getLink(array('section' => 'configfiles', 'page' => $page, 'distribution' => $distribution, 'service' => $service))}">{$lng['panel']['back']}</a>]
[<a href="{$linker->getLink(array('section' => 'configfiles', 'page' => $page, 'distribution' => $distribution, 'service' => $service))}">{$lng['panel']['back']}</a>]
</h2> </h2>
</header> </header>
<section> <section>
<table class="full"> <table class="full" id="howto">
{$configpage}
<if $restart != ''>
<tr class="section">
<th>{$lng['admin']['configfiles']['restart']}</th>
<tr> <tr>
<tr> <th>{$lng['admin']['configfiles']['legend']}</th>
<td> <th class="right">[close]</th>
<textarea class="textarea_border" rows="" cols="70" readonly="readonly">$restart</textarea></td>
</tr> </tr>
</if> <tr>
</table> <th>{$lng['admin']['configfiles']['commands']}</th>
<br /> <td><pre class="shell">
chmod u+x example-script.sh
./example-script.sh</pre></td>
</tr>
<tr>
<th>{$lng['admin']['configfiles']['files']}</th>
<td>
<pre class="filecontent">Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
ut labore et dolore magna aliquyam erat, sed diam voluptua.
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</pre>
</td>
</tr>
</table>
</section>
<section>
{$configpage}
</section> </section>
</article> </article>
$footer $footer

View File

@@ -1,6 +1,3 @@
<tr class="section"> <div>
<th>{$lng['admin']['configfiles']['commands']}</th> <pre class="shell">{$commands}</pre>
</tr> </div>
<tr>
<td><textarea rows="10" cols="70" readonly="readonly">{$commands}</textarea></td>
</tr>

View File

@@ -1,5 +1,4 @@
<p> <div>
<label><b>{$realname}</b></label><br /> <pre class="shell">&dollar;EDITOR {$realname}</pre>
<textarea rows="<if $numbrows <= 10 >{$numbrows}</if><if 10 < $numbrows >10</if>" cols="70" readonly="readonly" id="selectall">{$file_content}</textarea> <pre class="filecontent">{$file_content}</pre>
</p> </div>

View File

@@ -1,6 +0,0 @@
<tr class="section">
<th>{$lng['admin']['configfiles']['files']}</th>
</tr>
<tr>
<td>{$files}</td>
</tr>

View File

@@ -0,0 +1,5 @@
<div class="filesub">
{$commands_pre}
{$commands_file}
{$commands_post}
</div>

View File

@@ -17,11 +17,31 @@ $header
<table class="tiny center"> <table class="tiny center">
<tr> <tr>
<td><b>{$lng['admin']['configfiles']['distribution']}:</b></td> <td><b>{$lng['admin']['configfiles']['distribution']}:</b></td>
<td><if $distribution != ''><input type="hidden" name="distribution" value="$distribution"/><a href="{$linker->getLink(array('section' => 'configfiles', 'page' => $page))}">{$configfiles[$distribution]['label']}</a><else><select id="config_distribution" name="distribution"><option value="choose">{$lng['admin']['configfiles']['choosedistribution']}</option>{$distributions_select}</select></if></td> <td>
<if $distribution != ''>
<input type="hidden" name="distribution" value="$distribution"/>
<a href="{$linker->getLink(array('section' => 'configfiles', 'page' => $page))}">{$dist_display}</a>
<else>
<select id="config_distribution" name="distribution">
<option value="choose">{$lng['admin']['configfiles']['choosedistribution']}</option>
{$distributions_select}
</select>
</if>
</td>
</tr> </tr>
<tr> <tr>
<td><b>{$lng['admin']['configfiles']['service']}:</b></td> <td><b>{$lng['admin']['configfiles']['service']}:</b></td>
<td><if $service != ''><input type="hidden" name="service" value="$service"/><a href="{$linker->getLink(array('section' => 'configfiles', 'page' => $page, 'distribution' => $distribution))}">{$configfiles[$distribution]['services'][$service]['label']}</a><else><select id="config_service" name="service"><option value="choose">{$lng['admin']['configfiles']['chooseservice']}</option>{$services_select}</select></if></td> <td>
<if $service != ''>
<input type="hidden" name="service" value="$service"/>
<a href="{$linker->getLink(array('section' => 'configfiles', 'page' => $page, 'distribution' => $distribution))}">{$services[$service]->title}</a>
<else>
<select id="config_service" name="service">
<option value="choose">{$lng['admin']['configfiles']['chooseservice']}</option>
{$services_select}
</select>
</if>
</td>
</tr> </tr>
<tr> <tr>
<td><b>{$lng['admin']['configfiles']['daemon']}:</b></td> <td><b>{$lng['admin']['configfiles']['daemon']}:</b></td>

View File

@@ -1453,3 +1453,14 @@ table thead th.tablesorter-headerDesc {
.nolbr { .nolbr {
white-space: nowrap; white-space: nowrap;
} }
.shell {
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
color: #bbb;
background-color: #333;
border: 1px solid #000;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
padding: 10px;
}