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,74 @@
<?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 l'ajout de compte ftp
if ( VerifPOST("Nom", "#^[a-z0-9]+$#", 3, 9) == "ChaineValide" )
{
if ( VerifPOST("MotDePasse", "#^[a-z0-9]+$#i", 3, 9) == "ChaineValide" )
{
if ( (VerifPOST("Chemin", "#^/[a-z0-9/_-]+/$#", 1, 70) == "ChaineValide") or (VerifPOST("Chemin", "#^/$#", 1, 70) == "ChaineValide") )
{
if ( (VerifPOST("Commentaire", "#^[a-z0-9 ]+$#i", 1, 50) == "ChaineValide") or (VerifPOST("Commentaire", "#^[a-z0-9]+$#i", 1, 50) == "ChaineVide") )
{
$VerifExistance = $MySql->Select ("*", "ftp", "Nom='".$_SESSION['Utilisateur']."_".$_POST['Nom']."'", "", "", "", "");
if ( $VerifExistance == FALSE )
{
$Conteneur = "Utilisateur, Nom, Password, Status, Chemin, Commentaire, DateDeCreation";
$Contenu = "'".$_SESSION['Utilisateur']."', '".$_SESSION['Utilisateur']."_".$_POST['Nom']."', '".$_POST['MotDePasse']."', '1', '".$_POST['Chemin']."', '".$_POST['Commentaire']."', '".time()."'";
$MySql->Insert ($Conteneur,$Contenu, "ftp");
Redirect ('Page-Ftp-Recapitulatif.html');
}
else
{
$_SESSION['Resultat'] = "Ce compte existe deja.";
$_SESSION['Lien'] = "Page-Ftp-AjoutCompte.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le commentaire est incorrect.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le chemin est incorrect (il doit commencer et finir par /)";
$_SESSION['Lien'] = "Page-Ftp-AjoutCompte.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le mot de passe est incorrect";
$_SESSION['Lien'] = "Page-Ftp-AjoutCompte.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le nom du compte est incorrect";
$_SESSION['Lien'] = "Page-Ftp-AjoutCompte.html";
Redirect ('resultat.html');
}
?>

View File

@@ -0,0 +1,70 @@
<?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 suppresion d'un compte ftp
if ( VerifPOST("Nom", "#^[a-z0-9]+_[a-z0-9]+$#", 3, 25) == "ChaineValide" )
{
if ( VerifPOST("MotDePasse", "#^[a-z0-9]+$#", 3, 9) == "ChaineValide" )
{
$VerifExistence = $MySql->Select ("*", "ftp", "Nom='".$_POST['Nom']."'", "", "", "", "");
if ( $VerifExistence != FALSE )
{
if ( $VerifExistence[0]["Utilisateur"] == $_SESSION['Utilisateur'] )
{
if ( $VerifExistence[0]["Status"] == "2" )
{
$UpdateDB = $MySql->Update ("ftp", "Status", "3", "Nom='".$_POST['Nom']."'");
Redirect ('Page-Ftp-Recapitulatif.html');
}
else
{
$_SESSION['Resultat'] = "Ce compte n'est pas activ<69> (ou deja en cours de suppression)";
$_SESSION['Lien'] = "Page-Ftp-SuppressionCompte.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Monsieur veut la jouer h4X00R ?";
$_SESSION['Lien'] = "Page-Ftp-SuppressionCompte.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Ce compte n'existe pas";
$_SESSION['Lien'] = "Page-Ftp-SuppressionCompte.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le mot de passe est incorrect";
$_SESSION['Lien'] = "Page-Ftp-SuppressionCompte.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Aucun compte n'est selection<6F>";
$_SESSION['Lien'] = "Page-Ftp-SuppressionCompte.html";
Redirect ('resultat.html');
}
?>