Migration

This commit is contained in:
2016-02-21 01:33:05 +01:00
commit 6db8a86a48
386 changed files with 17311 additions and 0 deletions

View File

@@ -0,0 +1,200 @@
<?php
/*
Copyright (C) 2007 Mercier Benjamin
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
$ListTable = $MySql->Select ("*", "domainedns", "Utilisateur='".$_SESSION['Utilisateur']."'", "", "", "", "");
$CountEnregistrement = count ($ListTable);
if ( $ListTable == FALSE ) { $CountEnregistrement = 0; }
$CountSousDomaines = $MySql->Count('id', 'sousdomainedns', "Utilisateur='{$_SESSION['Utilisateur']}'");
?>
<h3>Récapitulatif de vos noms de domaine <a style="border: 0px;" href="http://doc.kelio.org/"><img style="vertical-align:middle; border: 0px;" src="img/icons-panel/question.png" alt="Aide" title="Aide" /></a></h3>
<p class="notice">
Actuellement, vous avez <?php echo $CountEnregistrement; if ($_SESSION['Offre']['DomaineDns'] != '-1') echo " / {$_SESSION['Offre']['DomaineDns']}"; ?> domaine(s)
et <?php echo $CountSousDomaines; if($_SESSION['Offre']['SousDomaineDns'] != -1) echo " / {$_SESSION['Offre']['SousDomaineDns']}"; ?> sous domaine(s).
</p>
<p>
Pour rappel, une adresse IP est l'équivalent d'une adresse postale dans le domaine informatique. Chaque ordinateur ou équipement informatique connecté au réseau dispose d'une adresse IP.
Le service DNS sert à répondre aux internautes "ce (sous) domaine correspond à cette adresse IP".
</p>
<p>Passez votre souris sur le commentaire pour le voir en entier.</p>
<p>
Le statut "En attente" signifie que votre nom de domaine ou votre sous domaine est en attente de création par notre robot. Normalement, cette opération prend moins d'une heure.<br />
Il en est de même pour le statut "Suppression".
</p>
<p>Pour utiliser nos serveurs DNS, configurez ceux-ci chez votre registrar pour pointer sur <strong>ns1.kelio.org</strong> et <strong>ns2.kelio.org</strong>. <br />Rendez-vous sur notre forum pour obtenir de l'aide.</p>
<div>
<table>
<thead>
<tr>
<th>(Sous) domaine</th>
<th>Date de création</th>
<th>Statut</th>
<th>Racine</th>
<th>Basedir</th>
<th>Mail</th>
<th>Commentaire</th>
</tr>
</thead>
<tbody>
<?php
if ( $ListTable == FALSE )
echo '<tr><td style="text-align: center; font-weight: bold;" colspan="7">Aucun nom de domaine pour le moment</td></tr>';
else
{
for ($i=0; $i < $CountEnregistrement; $i++)
{
if ( $ListTable[$i]["Status"] == KELIO_WAIT )
$Status = "<img src='img/icons-panel/wait.png' style='vertical-align: middle;' alt='En Attente' /> En attente";
elseif ( $ListTable[$i]["Status"] == KELIO_ACTIVE )
$Status = "<img src='img/icons-panel/active.png' style='vertical-align: middle;' alt='Activé' /> Activé";
elseif ( $ListTable[$i]["Status"] == KELIO_DELETE )
$Status = "<img src='img/icons-panel/delete.png' style='vertical-align: middle;' alt='Suppresion' /> Suppression";
else // KELIO_ERROR
$Status = "<img src='img/icons-panel/error.png' style='vertical-align: middle;' alt='Erreur' /> Erreur";
// Commentaire
if ( strlen($ListTable[$i]["Commentaire"]) > 16 )
$Commentaire = substr ($ListTable[$i]["Commentaire"], 0, 16)."...";
elseif ( strlen($ListTable[$i]["Commentaire"]) == 0 )
$Commentaire = "-";
else
$Commentaire = $ListTable[$i]["Commentaire"];
// Domaine
if ( strlen($ListTable[$i]["Domaine"]) > 15 )
$Domaine = substr($ListTable[$i]["Domaine"], 0, 15)."...";
else
$Domaine = $ListTable[$i]["Domaine"];
// Racine
if ( strlen($ListTable[$i]["Racine"]) > 15 )
$Racine = substr($ListTable[$i]["Racine"], 0, 15)."...";
else
$Racine = $ListTable[$i]["Racine"];
// OpenBasedir
if ( strlen($ListTable[$i]["OpenBasedir"]) > 15 )
$OpenBasedir = substr($ListTable[$i]["OpenBasedir"], 0, 15)."...";
else
$OpenBasedir = $ListTable[$i]["OpenBasedir"];
// Mail
if ( strlen($ListTable[$i]["Mail"]) > 15 )
$Mail = substr($ListTable[$i]["Mail"], 0, 15)."...";
else
$Mail = $ListTable[$i]["Mail"];
echo '
<tr>
<th><span style="cursor: help;" title="'.$ListTable[$i]["Domaine"].'">'.$Domaine.'</span></th>
<td><span style="cursor: help;" title="'.date ("d-m-Y H:i:s",$ListTable[$i]["DateDeCreation"]).'">'.date("d-m-Y", $ListTable[$i]["DateDeCreation"]).'</span></td>
<td>'.$Status.'</td>
<td><span style="cursor: help;" title="'.$ListTable[$i]["Racine"].'">'.$Racine.'</span></td>
<td><span style="cursor: help;" title="'.$ListTable[$i]["OpenBasedir"].'">'.$OpenBasedir.'</span></td>
<td><span style="cursor: help;" title="'.$ListTable[$i]["Mail"].'">'.$Mail.'</span></td>
<td><span style="cursor: help;" title="'.$ListTable[$i]["Commentaire"].'">'.$Commentaire.'</span></td>
</tr>';
$ListSousDomaine = $MySql->Select ("*", "sousdomainedns", "Domaine='".$ListTable[$i]["Domaine"]."'", "", "", "", "");
if ( $ListSousDomaine == FALSE )
echo '<tr><td style="text-align: center;" colspan="7">Aucun sous-domaine pour '.$ListTable[$i]["Domaine"].'</td></tr>';
else
{
$CountSousDomaine = count ($ListSousDomaine);
for ($o=0; $o < $CountSousDomaine; $o++)
{
if ( $ListSousDomaine[$o]["Status"] == KELIO_WAIT )
$StatusSousDomaine = "<img src='img/icons-panel/wait.png' style='vertical-align: middle;' alt='En attente' /> En attente";
elseif ( $ListSousDomaine[$o]["Status"] == KELIO_ACTIVE )
$StatusSousDomaine = "<img src='img/icons-panel/active.png' style='vertical-align: middle;' alt='Activé' /> Activé";
elseif ( $ListSousDomaine[$o]["Status"] == KELIO_DELETE )
$StatusSousDomaine = "<img src='img/icons-panel/delete.png' style='vertical-align: middle;' alt='Suppresion' /> Suppression";
else // KELIO_ERROR
$StatusSousDomaine = "<img src='img/icons-panel/error.png' style='vertical-align: middle;' alt='Erreur' /> Erreur";
if ( strlen($ListSousDomaine[$o]["Commentaire"]) > 16 )
$CommentaireSousDomaine = substr ($ListSousDomaine[$o]["Commentaire"], 0, 16)."...";
elseif ( strlen($ListSousDomaine[$o]["Commentaire"]) == 0 )
$CommentaireSousDomaine = "-";
else
$CommentaireSousDomaine = $ListSousDomaine[$o]["Commentaire"];
// Donnee
if ( strlen($ListSousDomaine[$o]["Donnee"]) > 15 )
$Donnee = substr($ListSousDomaine[$o]["Donnee"], 0, 15)."...";
else
$Donnee = $ListSousDomaine[$o]["Donnee"];
// Racine
if ( strlen($ListSousDomaine[$o]["Racine"]) > 15 )
$Racine = substr($ListSousDomaine[$o]["Racine"], 0, 15)."...";
else
$Racine = $ListSousDomaine[$o]["Racine"];
// OpenBasedir
if ( strlen($ListSousDomaine[$o]["OpenBasedir"]) > 15 )
$OpenBasedir = substr($ListSousDomaine[$o]["OpenBasedir"], 0, 15)."...";
else
$OpenBasedir = $ListSousDomaine[$o]["OpenBasedir"];
// Pointage
if ( strlen($ListSousDomaine[$o]["Pointage"]) > 20 )
$Pointage = substr($ListSousDomaine[$o]["Pointage"], 0, 20)."...";
else
$Pointage = $ListSousDomaine[$o]["Pointage"];
// Type de pointage
switch($ListSousDomaine[$o]["Type"])
{
case 2: $TypePointage = "CNAME"; break;
case 3: $TypePointage = "A"; break;
case 4: $TypePointage = "AAAA"; break;
}
echo '
<tr class="special">
<td style="padding-left: 30px;"><span style="cursor: help;" title="'.$ListSousDomaine[$o]['Donnee'].'">'.$Donnee.'</span></td>
<td><span style="cursor: help;" title="'.date ("d-m-Y H:i:s",$ListSousDomaine[$o]["DateDeCreation"]).'">'.date("d-m-Y", $ListSousDomaine[$o]["DateDeCreation"]).'</span></td>
<td>'.$StatusSousDomaine.'</td>';
if($ListSousDomaine[$o]['Type'] == 1)
{
echo '<td><span style="cursor: help;" title="'.$ListSousDomaine[$o]["Racine"].'">'.$Racine.'</span></td>';
echo '<td colspan="2"><span style="cursor: help;" title="'.$ListSousDomaine[$o]["OpenBasedir"].'">'.$OpenBasedir.'</span></td>';
}
elseif( ($ListSousDomaine[$o]['Type'] > 1) || ($ListSousDomaine[$o]['Type'] < 5))
echo '<td colspan="3"><b>Externe</b>: <span style="cursor: help;" title="'.$ListSousDomaine[$o]["Pointage"].'">'.$Pointage.'</span> ('.$TypePointage.')</td>';
else
echo '<td colspan="3" style="font-weight: bold;">Erreur de création</td>';
echo '
<td><span style="cursor: help;" title="'.$ListSousDomaine[$o]["Commentaire"].'">'.$CommentaireSousDomaine.'</span></td>
</tr>' ;
}
}
}
}
?>
</tbody>
</table>
</div>