Files
keliopanel-v1/0.9.0/panel/module/email/recapitulatif.php
2016-02-21 01:33:05 +01:00

214 lines
6.2 KiB
PHP
Executable File

<?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.
*/
$ListCompte = $MySql->Select ("*", "email", "Utilisateur='".$_SESSION['Utilisateur']."' AND Type='compte'", "", "", "", "");
$ListAlias = $MySql->Select ("*", "email", "Utilisateur='".$_SESSION['Utilisateur']."' AND Type='alias'", "", "", "", "");
$CountCompte = count($ListCompte);
$CountAlias = count ($ListAlias);
if ( $ListCompte == FALSE ) { $CountCompte = 0; }
if ( $ListAlias == FALSE ) { $CountAlias = 0; }
?>
<h3>Récapitulatif de comptes et alias e-mail <a style="border: 0px;" href="http://doc.kelio.org/utiliser_la_messagerie"><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 $CountCompte; ?><?php if ($_SESSION['Offre']['CompteEmail'] != '-1'):?>/<?php echo $_SESSION['Offre']['CompteEmail']?><?php endif; ?> compte(s) email et <?php echo $CountAlias; ?><?php if ($_SESSION['Offre']['AliasEmail'] != '-1'):?>/<?php echo $_SESSION['Offre']['AliasEmail']; ?><?php endif;?> alias.
</p>
<p>
Passez votre souris sur le commentaire pour le voir en entier.<br /><br />
Le statut "Création" signifie que votre compte/alias est en attente de création par notre robot. <br />
Normalement, cette opération prend moins d'une heure.<br />
Il en est de meme pour le statut "Suppression".
</p>
<h4>Liste des comptes email</h4>
<div>
<table>
<thead>
<tr>
<th>Nom</th>
<th>Date</th>
<th>Statut</th>
<th>Mot de passe</th>
<th>Commentaire</th>
</tr>
</thead>
<tbody>
<?php
if ( $ListCompte == FALSE )
{
echo '
<tr>
<td colspan="6" style="text-align:center; font-weight: bold;">Il n\'y a aucun email pour le moment.</td>
</tr>';
}
else
{
for ($i=0; $i < $CountCompte; $i++)
{
if ( $ListCompte[$i]["Status"] == "1" )
{
$Status = "<img src=\"img/icons-panel/wait.png\" style=\"vertical-align: middle;\" alt=\"Création\" /> Création";
}
elseif ( $ListCompte[$i]["Status"] == "2" )
{
$Status = "<img src=\"img/icons-panel/active.png\" style=\"vertical-align: middle;\" alt=\"Activé\" /> Activé";
}
elseif ( $ListCompte[$i]["Status"] == "3" )
{
$Status = "<img src=\"img/icons-panel/delete.png\" style=\"vertical-align: middle;\" alt=\"Suppresion\" /> Suppression";
}
else
{
$Status = "<img src=\"img/icons-panel/error.png\" style=\"vertical-align: middle;\" alt=\"Erreur\" /> Erreur";
}
if ( strlen($ListCompte[$i]["Commentaire"]) > 19 )
{
$Commentaire = substr ($ListCompte[$i]["Commentaire"], 0, 19)." ...";
}
elseif ( strlen($ListCompte[$i]["Commentaire"]) == 0 )
{
$Commentaire = "-";
}
else
{
$Commentaire = $ListCompte[$i]["Commentaire"];
}
if ( strlen($ListCompte[$i]["Nom"]) > 16 )
{
$Nom = substr ($ListCompte[$i]["Nom"], 0, 16)." ...";
}
else
{
$Nom = $ListCompte[$i]["Nom"];
}
echo '
<tr>
<td><span style="cursor:help;" title="'.$ListCompte[$i]["Nom"].'">'.$Nom.'</span></td>
<td><span style="cursor:help;" title="'.date ("d-m-Y H:i:s",$ListCompte[$i]["DateDeCreation"]).'">'.date("d-m-Y", $ListCompte[$i]["DateDeCreation"]).'</span></td>
<td>'.$Status.'</td>
<td>'.$ListCompte[$i]["Password"].'</td>
<td>'.$Commentaire.'</td>
</tr>';
}
}
?>
</tbody>
</table>
</div>
<br />
<h4>Liste des alias email</h4>
<div>
<table>
<thead>
<tr>
<th>Nom</th>
<th>Date</th>
<th>Statut</th>
<th>Destination</th>
<th>Commentaire</th>
</tr>
</thead>
<tbody>
<?php
if ( $ListAlias == FALSE )
{
echo '
<tr>
<td colspan="6" style="text-align:center; font-weight: bold;">Il n\'y a aucun alias pour le moment.</td>
</tr>';
}
else
{
for ($i=0; $i < $CountAlias; $i++)
{
if ( $ListAlias[$i]["Status"] == "1" )
{
$Status = "<img src=\"img/icons-panel/wait.png\" style=\"vertical-align: middle;\" alt=\"Création\" /> Création";
}
elseif ( $ListAlias[$i]["Status"] == "2" )
{
$Status = "<img src=\"img/icons-panel/active.png\" style=\"vertical-align: middle;\" alt=\"Activé\" /> Activé";
}
elseif ( $ListAlias[$i]["Status"] == "3" )
{
$Status = "<img src=\"img/icons-panel/delete.png\" style=\"vertical-align: middle;\" alt=\"Suppresion\" /> Suppression";
}
else
{
$Status = "<img src=\"img/icons-panel/error.png\" style=\"vertical-align: middle;\" alt=\"Erreur\" /> Erreur";
}
if ( strlen($ListAlias[$i]["Nom"]) > 16 )
{
$Nom = substr ($ListAlias[$i]["Nom"], 0, 16)." ...";
}
else
{
$Nom = $ListAlias[$i]["Nom"];
}
if ( strlen($ListAlias[$i]["Pointage"]) > 16 )
{
$Pointage = substr ($ListAlias[$i]["Pointage"], 0, 16)." ...";
}
else
{
$Pointage = $ListAlias[$i]["Pointage"];
}
if ( strlen($ListAlias[$i]["Commentaire"]) > 16 )
{
$Commentaire = substr ($ListCompte[$i]["Commentaire"], 0, 16)." ...";
}
elseif ( strlen($ListAlias[$i]["Commentaire"]) == 0 )
{
$Commentaire = "-";
}
else
{
$Commentaire = $ListAlias[$i]["Commentaire"];
}
echo '
<tr>
<td><span style="cursor:help;" title="'.$ListAlias[$i]["Nom"].'">'.$Nom.'</span></td>
<td><span style="cursor:help;" title="'.date ("d-m-Y H:i:s",$ListAlias[$i]["DateDeCreation"]).'">'.date("d-m-Y", $ListAlias[$i]["DateDeCreation"]).'</span></td>
<td>'.$Status.'</td>
<td><span style="cursor:help;" title="'.$ListAlias[$i]["Pointage"].'">'.$Pointage.'</span></td>
<td><span style="cursor:help;" title="'.$ListAlias[$i]["Commentaire"].'">'.$Commentaire.'</span></td>
</tr>';
}
}
?>
</tbody>
</table>
</div>