Vhost templates: Added a field to select the target webserver

This commit is contained in:
Johannes Feichtner
2016-02-27 20:18:16 +01:00
parent 9f85074876
commit 088eef9728
9 changed files with 97 additions and 96 deletions

View File

@@ -1012,7 +1012,8 @@ if ($page == 'domains'
// vhost configs
$vhostconfigs = '';
$configsvhost = Database::query("SELECT * FROM `" . TABLE_PANEL_VHOSTCONFIGS . "` ORDER BY description ASC");
$configsvhost = Database::prepare("SELECT * FROM `" . TABLE_PANEL_VHOSTCONFIGS . "` WHERE `webserver` = :webserver ORDER BY description ASC");
Database::pexecute($configsvhost, array('webserver' => Settings::Get('system.webserver')));
$vhostconfigs.= makeoption($lng['admin']['vhostsettings']['novhostsettings'], 0);
while ($row = $configsvhost->fetch(PDO::FETCH_ASSOC)) {
@@ -1997,7 +1998,9 @@ if ($page == 'domains'
// vhost configs
$vhostconfigs = '';
$vhostconfigs_result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_VHOSTCONFIGS . "` ORDER BY description ASC");
$vhostconfigs_result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_VHOSTCONFIGS . "` WHERE `webserver` = :webserver ORDER BY description ASC");
Database::pexecute($vhostconfigs_result_stmt, array('webserver' => Settings::Get('system.webserver')));
$vhostconfigs .= makeoption($lng['admin']['vhostsettings']['novhostsettings'], 0);
while ($vhostconfig_row = $vhostconfigs_result_stmt->fetch(PDO::FETCH_ASSOC)) {
$vhostconfigs .= makeoption($vhostconfig_row['description'], $vhostconfig_row['id'], $result['vhostsettingid'], true, true);