normaliser les titres des tableaux (servernames, alias, etc.)

This commit is contained in:
Nicolas Roman 2019-04-23 10:32:38 +02:00
parent 1ca2f0f695
commit 6215d4c056
6 changed files with 27 additions and 27 deletions

View file

@ -114,7 +114,7 @@ elseif (isset($params[2]) && $params[2] == "add") {
$form = new FormPage("Ajout d'un alias", FALSE); $form = new FormPage("Ajout d'un alias", FALSE);
$form->addField('domain_alias', new DomainInputFormField("Alias", TRUE)); $form->addField('domain_alias', new DomainInputFormField("Alias", TRUE));
$form->addField('domain_linked', new SelectFormField("Domaine lié", True, $data_output_servername)); $form->addField('domain_linked', new SelectFormField("Servername lié", True, $data_output_servername));
if (!empty($_POST)) { if (!empty($_POST)) {
$form->isCurrentPage(TRUE); $form->isCurrentPage(TRUE);
@ -229,10 +229,10 @@ elseif (isset($params[2]) && $params[2] == "add") {
} }
} }
else { else {
print "<h2>Ajout d'un serveralias</h2><hr>"; print "<h2>Ajout d'un alias</h2><hr>";
print "<form name=\"form-add\" id=\"form-add\" action=\"\" method=\"POST\">"; print "<form name=\"form-add\" id=\"form-add\" action=\"\" method=\"POST\">";
print " <fieldset>"; print " <fieldset>";
print " <legend>Ajout d'un serveralias</legend>"; print " <legend>Ajout d'un alias</legend>";
print $form; print $form;
print " <p><input type=\"submit\" value=\"Créer\"/></p>"; print " <p><input type=\"submit\" value=\"Créer\"/></p>";
print " </fieldset>"; print " </fieldset>";
@ -240,10 +240,10 @@ elseif (isset($params[2]) && $params[2] == "add") {
} }
} else { } else {
print "<h2>Ajout d'un serveralias</h2><hr>"; print "<h2>Ajout d'un alias</h2><hr>";
print "<form name=\"form-add\" id=\"form-add\" action=\"\" method=\"POST\">"; print "<form name=\"form-add\" id=\"form-add\" action=\"\" method=\"POST\">";
print " <fieldset>"; print " <fieldset>";
print " <legend>Ajout d'un serveralias</legend>"; print " <legend>Ajout d'un alias</legend>";
print $form; print $form;
print " <p><input type=\"submit\" value=\"Créer\"/></p>"; print " <p><input type=\"submit\" value=\"Créer\"/></p>";
print " </fieldset>"; print " </fieldset>";

View file

@ -28,8 +28,8 @@ if (isset($params[2]) && $params[2] == "edit") {
include_once EVOADMIN_BASE . '../tpl/header.tpl.php'; include_once EVOADMIN_BASE . '../tpl/header.tpl.php';
include_once EVOADMIN_BASE . '../tpl/menu.tpl.php'; include_once EVOADMIN_BASE . '../tpl/menu.tpl.php';
$form = new FormPage("Modification du ServerName", FALSE); $form = new FormPage("Modification du Servername", FALSE);
$form->addField('domain_servername', new DomainInputFormField("ServerName", TRUE), $params[3]); $form->addField('domain_servername', new DomainInputFormField("Servername", TRUE), $params[3]);
$form->addField('previous_servername', new DomainInputFormField("", TRUE, TRUE), $params[3]); $form->addField('previous_servername', new DomainInputFormField("", TRUE, TRUE), $params[3]);
if (!empty($_POST)) { if (!empty($_POST)) {
@ -126,40 +126,40 @@ if (isset($params[2]) && $params[2] == "edit") {
if ($exec_return == 0) { if ($exec_return == 0) {
//domain_add($serveralias['alias'], gethostbyname($master) , false); TODO avec l'IP du load balancer //domain_add($serveralias['alias'], gethostbyname($master) , false); TODO avec l'IP du load balancer
print "<center>"; print "<center>";
printf ('<p>Le ServerName %s a bien été modifié</p>', $servername['servername']); printf ('<p>Le Servername %s a bien été modifié</p>', $servername['servername']);
printf ('<p><a href="%s">Retour à la liste des ServerNames</a></p>', $redirect_url); printf ('<p><a href="%s">Retour à la liste des Servernames</a></p>', $redirect_url);
print "</center>"; print "</center>";
} }
else { else {
print "<center>"; print "<center>";
printf ('<p>Echec dans la modification du ServerName %s</p>', $servername['servername']); printf ('<p>Echec dans la modification du Servername %s</p>', $servername['servername']);
printf ('<p><a href="%s">Retour à la liste des ServerNames</a></p>', $redirect_url); printf ('<p><a href="%s">Retour à la liste des Servernames</a></p>', $redirect_url);
print "</center>"; print "</center>";
} }
} }
else { else {
print "<center>"; print "<center>";
printf ('<p>Echec dans la modification du ServerName %s</p>', $servername['servername']); printf ('<p>Echec dans la modification du Servername %s</p>', $servername['servername']);
print ('<p>Le domaine existe déjà dans d\'autres vhosts.'); print ('<p>Le domaine existe déjà dans d\'autres vhosts.');
printf ('<p><a href="%s">Retour à la liste des ServerNames</a></p>', $redirect_url); printf ('<p><a href="%s">Retour à la liste des Servernames</a></p>', $redirect_url);
print "</center>"; print "</center>";
} }
} }
} else { } else {
print "<h2>Modification du ServerName</h2><hr>"; print "<h2>Modification du Servername</h2><hr>";
print "<form name=\"form-add\" id=\"form-add\" action=\"\" method=\"POST\">"; print "<form name=\"form-add\" id=\"form-add\" action=\"\" method=\"POST\">";
print " <fieldset>"; print " <fieldset>";
print " <legend>Modification du ServerName</legend>"; print " <legend>Modification du Servername</legend>";
print $form; print $form;
print " <p><input type=\"submit\" value=\"Modifier\"/></p>"; print " <p><input type=\"submit\" value=\"Modifier\"/></p>";
print " </fieldset>"; print " </fieldset>";
print "</form>"; print "</form>";
} }
} else { } else {
print "<h2>Modification du ServerName</h2><hr>"; print "<h2>Modification du Servername</h2><hr>";
print "<form name=\"form-add\" id=\"form-add\" action=\"\" method=\"POST\">"; print "<form name=\"form-add\" id=\"form-add\" action=\"\" method=\"POST\">";
print " <fieldset>"; print " <fieldset>";
print " <legend>Modification du ServerName</legend>"; print " <legend>Modification du Servername</legend>";
print $form; print $form;
print " <p><input type=\"submit\" value=\"Modifier\"/></p>"; print " <p><input type=\"submit\" value=\"Modifier\"/></p>";
print " </fieldset>"; print " </fieldset>";

View file

@ -29,7 +29,7 @@
<thead> <thead>
<tr> <tr>
<th>Alias</th> <th>Alias</th>
<th>Domaine</th> <th>Servername</th>
<?php if (is_superadmin()) { <?php if (is_superadmin()) {
print '<th>Action</th>'; print '<th>Action</th>';
} ?> } ?>
@ -40,7 +40,7 @@
for ( $i=0; $i < count($vhost_list); ++$i ) { for ( $i=0; $i < count($vhost_list); ++$i ) {
for ($y = 0; $y < count($vhost_list[$i]['aliases']); $y++) { for ($y = 0; $y < count($vhost_list[$i]['aliases']); $y++) {
print '<tr>'; print '<tr>';
printf('<td><a href="http://%s">http://%s</a></td>', printf('<td>%s</td>',
$vhost_list[$i]['aliases'][$y], $vhost_list[$i]['aliases'][$y]); $vhost_list[$i]['aliases'][$y], $vhost_list[$i]['aliases'][$y]);
printf('<td>%s</td>', printf('<td>%s</td>',
$vhost_list[$i]['servername']); $vhost_list[$i]['servername']);

View file

@ -22,7 +22,7 @@
<table id="tab-list"> <table id="tab-list">
<thead> <thead>
<tr> <tr>
<th>ServerName</th> <th>Servername</th>
<th>Utilisateur</th> <th>Utilisateur</th>
<?php if (is_superadmin()) { <?php if (is_superadmin()) {
print '<th>Action</th>'; print '<th>Action</th>';

View file

@ -13,7 +13,7 @@
?> ?>
<h2>ServerNames</h2> <h2>Servernames</h2>
<?php <?php
@ -22,7 +22,7 @@
<table id="tab-list"> <table id="tab-list">
<thead> <thead>
<tr> <tr>
<th>ServerName</th> <th>Servername</th>
<?php if (is_superadmin()) { <?php if (is_superadmin()) {
print '<th>Action</th>'; print '<th>Action</th>';
} ?> } ?>
@ -43,7 +43,7 @@
</table> </table>
<?php <?php
} else { } else {
print "<p>Aucun ServerName existant pour le domaine $domain !</p>"; print "<p>Aucun Servername existant pour le domaine $domain !</p>";
} }

View file

@ -22,9 +22,9 @@
<thead> <thead>
<tr> <tr>
<?php if(is_superadmin()) { <?php if(is_superadmin()) {
print '<th>Propriétaire</th>'; print '<th>Virtual Host</th>';
} ?> } ?>
<th>Domaine</th> <th>Servername</th>
<?php if(is_superadmin()) { <?php if(is_superadmin()) {
print '<th>Alias</th>'; print '<th>Alias</th>';
} }
@ -61,7 +61,7 @@
if(is_superadmin()) { if(is_superadmin()) {
printf('<td>%s</td>', $vhost_info['owner']); printf('<td>%s</td>', $vhost_info['owner']);
} }
printf('<td><a href="http://%s">http://%s</a></td>', printf('<td>%s</td>',
$vhost_info['server_name'], $vhost_info['server_name']); $vhost_info['server_name'], $vhost_info['server_name']);
if ($conf['cluster']) { if ($conf['cluster']) {
@ -87,7 +87,7 @@
printf('<td>%s</td>', $vhost_info['slave']); printf('<td>%s</td>', $vhost_info['slave']);
} }
printf('<td align="left">%s</td>', preg_replace('/,/','<br />',$vhost_info['server_alias'])); printf('<td>%s</td>', preg_replace('/,/','<br />',$vhost_info['server_alias']));
if ($conf['quota']) { if ($conf['quota']) {
printf('<td>%s</td>', $vhost_info['size']); printf('<td>%s</td>', $vhost_info['size']);