Migration
This commit is contained in:
107
0.7.1/panel/system/librairie/email/ajoutalias.php
Executable file
107
0.7.1/panel/system/librairie/email/ajoutalias.php
Executable file
@@ -0,0 +1,107 @@
|
||||
<?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.
|
||||
*/
|
||||
|
||||
// Librairie d'ajout d'un alias
|
||||
|
||||
if ( VerifPOST("Nom", "#^[a-z0-9._-]+@[a-z0-9._-]{2,15}\.[a-z]{2,4}$#", 7, 60) == "ChaineValide" )
|
||||
{
|
||||
if ( VerifPOST("Pointage", "#^[a-z0-9._-]+@[a-z0-9._-]{2,15}\.[a-z]{2,4}$#", 7, 60) == "ChaineValide" )
|
||||
{
|
||||
if ( ( VerifPOST("Commentaire", "#^[a-z0-9 ]+$#i", 0, 50) == "ChaineValide") or ( VerifPOST("Commentaire", "#^[a-z0-9]+$#i", 0, 50) == "ChaineVide"))
|
||||
{
|
||||
if ( VerifPOST("Nom", "#@kelio\.org#i", 0, 0) != "ChaineValide" )
|
||||
//if ( VerifPOST("Nom", "#kelio\.org#i", 0, 0) != "ChaineValide" )
|
||||
{
|
||||
$VerifExistente = $MySql->Select ("*", "email", "Nom='".$_POST['Nom']."'", "", "", "", "");
|
||||
if ( $VerifExistente == FALSE )
|
||||
{
|
||||
$Email = explode ('@', $_POST['Nom']);
|
||||
$Domaine = $Email[1];
|
||||
$Login = $Email[0];
|
||||
$VerifMX = getmxrr($Domaine, $Mxhost, $MxWeight);
|
||||
|
||||
if ( $VerifMX != FALSE )
|
||||
{
|
||||
$i=0;
|
||||
foreach ($Mxhost as $key => $value)
|
||||
{
|
||||
$ServeurMail[$value] = $MxWeight[$i];
|
||||
$i++;
|
||||
}
|
||||
asort($ServeurMail);
|
||||
|
||||
if ( (current(array_keys($ServeurMail)) == "mail.kelio.org") or (gethostbyname(current(array_keys($ServeurMail))) == gethostbyname("mail.kelio.org")) )
|
||||
{
|
||||
$Conteneur = "Utilisateur, Nom, Type, Pointage, Status, Commentaire, DateDeCreation";
|
||||
$Contenu = "'".$_SESSION['Utilisateur']."', '".$_POST['Nom']."', 'alias', '".$_POST['Pointage']."', '1', '".$_POST['Commentaire']."', '".time()."'";
|
||||
|
||||
$MySql->Insert ($Conteneur, $Contenu, "email");
|
||||
Redirect ('Page-Email-Recapitulatif.html');
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Le MX prioritaire ne pointe pas vers mail.kelio.org.<br />Il pointe actuellement vers ".current(array_keys($ServeurMail));
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutAlias.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Ce domaine n'a aucune redirection MX.";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutAlias.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Cet email existe deja.";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutAlias.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Vous ne pouvez pas utiliser le domaine kelio.org";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutAlias.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Le commentaire est incorrect";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutAlias.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "L'email de pointage de passe est incorrect";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutAlias.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "L'email est incorrect";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutAlias.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
107
0.7.1/panel/system/librairie/email/ajoutcompte.php
Executable file
107
0.7.1/panel/system/librairie/email/ajoutcompte.php
Executable file
@@ -0,0 +1,107 @@
|
||||
<?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.
|
||||
*/
|
||||
// Librairie d'ajout d'un compte email
|
||||
|
||||
if ( VerifPOST("Nom", "#^[a-z0-9._-]+@[a-z0-9._-]{2,15}\.[a-z]{2,4}$#", 7, 60) == "ChaineValide" )
|
||||
{
|
||||
if ( VerifPOST("MotDePasse", "#^[a-z0-9]+$#", 3, 9) == "ChaineValide" )
|
||||
{
|
||||
if ( ( VerifPOST("Commentaire", "#^[a-z0-9 ]+$#i", 0, 50) == "ChaineValide") or ( VerifPOST("Commentaire", "#^[a-z0-9]+$#i", 0, 50) == "ChaineVide"))
|
||||
{
|
||||
if ( VerifPOST("Nom", "#@kelio\.org#i", 0, 0) != "ChaineValide" )
|
||||
{
|
||||
$VerifExistente = $MySql->Select ("*", "email", "Nom='".$_POST['Nom']."'", "", "", "", "");
|
||||
if ( $VerifExistente == FALSE )
|
||||
{
|
||||
$Email = explode ('@', $_POST['Nom']);
|
||||
$Domaine = $Email[1];
|
||||
$Login = $Email[0];
|
||||
$VerifMX = getmxrr($Domaine, $Mxhost, $MxWeight);
|
||||
|
||||
$ServeurMail = array();
|
||||
if ( $VerifMX != FALSE )
|
||||
{
|
||||
$i=0;
|
||||
foreach ($Mxhost as $key => $value)
|
||||
{
|
||||
$ServeurMail[$value] = $MxWeight[$i];
|
||||
$i++;
|
||||
}
|
||||
asort($ServeurMail);
|
||||
|
||||
if ( (current(array_keys($ServeurMail)) == "mail.kelio.org") or (gethostbyname(current(array_keys($ServeurMail))) == gethostbyname("mail.kelio.org")) )
|
||||
{
|
||||
$Conteneur = "Utilisateur, Nom, Type, Password, Status, Commentaire, DateDeCreation";
|
||||
$Contenu = "'".$_SESSION['Utilisateur']."', '".$_POST['Nom']."', 'compte', '".$_POST['MotDePasse']."', '1', '".$_POST['Commentaire']."', '".time()."'";
|
||||
|
||||
$MySql->Insert ($Conteneur, $Contenu, "email");
|
||||
Redirect ('Page-Email-Recapitulatif.html');
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Le MX prioritaire ne pointe pas vers l'ip de mail.kelio.org.";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutCompte.html";
|
||||
Redirect ('resultat.html');
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Ce domaine n'a aucune redirection MX.";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutCompte.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Cet email existe deja.";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutCompte.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Vous ne pouvez pas utiliser le domaine kelio.org";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutCompte.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Le commentaire est incorrect";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutCompte.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Le mot de passe est incorrect";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutCompte.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "L'email est incorrect";
|
||||
$_SESSION['Lien'] = "Page-Email-AjoutCompte.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
69
0.7.1/panel/system/librairie/email/suppression.php
Executable file
69
0.7.1/panel/system/librairie/email/suppression.php
Executable file
@@ -0,0 +1,69 @@
|
||||
<?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.
|
||||
*/
|
||||
// Librairie contenant la suppression des domaines
|
||||
if ( VerifPOST("Nom", "#^[a-z0-9._-]+@[a-z0-9._-]{2,15}\.[a-z]{2,4}$#", 7, 60) == "ChaineValide" )
|
||||
{
|
||||
if ( VerifPOST("Confirmation", "#^oui$#", 3, 3) == "ChaineValide" )
|
||||
{
|
||||
$VerifExistence = $MySql->Select ("*", "email", "Nom='".$_POST['Nom']."'", "", "", "", "");
|
||||
if ( $VerifExistence != FALSE )
|
||||
{
|
||||
if ( $VerifExistence[0]["Utilisateur"] == $_SESSION['Utilisateur'] )
|
||||
{
|
||||
if ( $VerifExistence[0]["Status"] == "2" )
|
||||
{
|
||||
$UpdateDB = $MySql->Update ("email", "Status", "3", "Nom='".$_POST['Nom']."'");
|
||||
Redirect ('Page-Email-Recapitulatif.html');
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Ce compte/alias n'est pas activ<69> (ou deja en cours de suppression)";
|
||||
$_SESSION['Lien'] = "Page-Email-Suppression.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Email en cours de suppression<br />(Non, je plaisante :D)";
|
||||
$_SESSION['Lien'] = "http://www.perdu.com";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Cet email n'existe pas";
|
||||
$_SESSION['Lien'] = "Page-Email-Suppression.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Le code de confirmation est incorrect";
|
||||
$_SESSION['Lien'] = "Page-Email-Suppression.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['Resultat'] = "Aucun compte/alias n'est selection<6F>";
|
||||
$_SESSION['Lien'] = "Page-Email-Suppression.html";
|
||||
Redirect ('resultat.html');
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user