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,261 @@
<?php
// +----------------------------------------------------------------------+
// | Class de connexion Base de donn?es MySQL |
// +----------------------------------------------------------------------+
// | 5 Septembre 2004 |
// +----------------------------------------------------------------------+
// | Ceci est une classe pour la cr?ation d'objet de connexion ? une |
// | base de donn?e MySQL, ainsi que des m?thodes pour la gestion |
// | et les diff?rentes possibilit?s de s?lection. |
// +----------------------------------------------------------------------+
// | Auteur: Nottet Thomas |
// +----------------------------------------------------------------------+
// | Remarque: Tous les arguments des m?thodes sont de types STRING |
// +----------------------------------------------------------------------+
//
class Mysql
{
function Mysql($srv,$db,$usr,$pwd) //Constructeur
{
/* Ouverture d'une connexion ? un serveur MySQL et
selection de la table ? utiliser
$srv = nom du serveur MySQL
$db = Base de donn?es ? utiliser
$usr = nom d'utlisateur du serveur MySQL
$pwd = mot de passe de cette utilisateur
*/
$this->db=$db;
$this->id_connect=@mysql_connect($srv,$usr,$pwd);
$dbselect=@mysql_select_db($this->db, $this->id_connect);
if(!$dbselect)
{
$this->Close();
$this->id_connect=false;
}
}
public function Close()
{
@mysql_close($this->id_connect);
}
public function Select($champs,$tables,$conditions,$group,$order,$nbrec,$liminf)
/* Effectue une requ?te SELECT sur la table choisie
RETOUR: une matrice (nbre de records X nbre de champs)
false en cas d'?chec ou 0 enregistrement
$champs = une liste des champs s?par?s par ,
$tables = une liste des tables s?par?es par , avec alias si n?cessaire
$conditions = liste des conditions s?par?s par des op?rateurs logiques
$group = champ(s) sur le(s)quel(s) sera effectu? un regroupement
$order = champ(s) sur le(s)quel(s) seront tri?s les enregistrements
(+ ASC pour croissant et DESC pour d?croissant)
$liminf = index du premier enregistrement de l'intervalle ? retourner
$nbrec = nombre d'enregistrements ? retourner
*/
{
$this->total_req++;
$query="SELECT ".$champs." FROM ".$tables;
if(!empty($conditions))
{
$query=$query." WHERE ".$conditions;
}
if(!empty($group))
{
$query=$query." GROUP BY ".$group;
}
if(!empty($order))
{
$query=$query." ORDER BY ".$order;
}
if(!empty($nbrec))
{
if(!empty($liminf))
{
$query=$query." LIMIT ".$liminf.", ".$nbrec;
}
else
{
$query=$query." LIMIT ".$nbrec;
}
}
if($this->id_connect != false)
{
$res=@mysql_query($query, $this->id_connect);
if (empty($res))
{
return false;
}
else
{
$nbRows=@mysql_num_rows($res);
if ($nbRows==0)
{
return false;
}
else
{
for($i=0;$i<$nbRows;$i++)
{
$enregs[$i]=@mysql_fetch_array($res);
}
return $enregs;
}
}
}
else
{
return false;
}
}
public function Count($champs,$tables,$conditions) {
$this->total_req++;
$query = "SELECT COUNT(".$champs.") AS count FROM ".$tables;
if(!empty($conditions)) {
$query.= " WHERE ".$conditions;
}
$res = @mysql_query($query, $this->id_connect);
if($res) {
$res2 = mysql_fetch_array($res);
return $res2['count'];
}
else {
return 0;
}
}
public function Insert($champs,$valeurs,$table)
/* Effectue une requ?te INSERT sur une table de la
base s?lectionn?e
RETOUR : True en cas de r?ussite
False en cas d'?chec
$champs = une liste des champs s?par?s par ,
$valeurs = une liste de valeurs pour les champs correspondant s?par?s par ,
$table = la table dans laquelle il faut ins?rer les enregistrements
*/
{
$this->total_req++;
$query="INSERT INTO ".$table." (".$champs.")
VALUES (".$valeurs.")";
if($this->id_connect != false)
{
$res= @mysql_query($query, $this->id_connect);
if ($res)
{
return true;
}
else
{
return mysql_error();
}
}
else
{
return mysql_error();
}
}
public function Delete($table,$conditions)
/* Effectue une requ?te DELETE sur une table de la
base s?lectionn?e
RETOUR : Le nombre d'enregistrements supprim?s
False en cas d'?chec
$table = la table dans laquelle il faut ins?rer les enregistrements
$conditions = liste des conditions s?par?s par des op?rateurs logiques
*/
{
$this->total_req++;
$query="DELETE FROM ".$table;
if(!empty($conditions))
{
$query=$query." WHERE ".$conditions;
}
if($this->id_connect != false)
{
$res=@mysql_query($query, $this->id_connect);
if (empty($res))
{
return false;
}
else
{
return mysql_affected_rows($this->id_connect);
}
}
}
public function Update($tables,$champs,$valeurs,$conditions)
/* Effectue une requ?te UPDATE sur une table de la
base s?lectionn?e
RETOUR : Le nombre d'enregistrements mis ? jour
False en cas d'?chec
$tables = listes de tables dans lesquelles il faut mettre ? jour les enregistrements
$champs = Champs ? mettre ? jour : soit une valeur
soit un vecteur si il y a plusieurs champs
$valeurs = Valeurs pour mettre ? jour : soit une valeur
soit un vecteur si il y a plusieurs champs
$conditions = liste des conditions s?par?s par des op?rateurs logiques
*/
{
$this->total_req++;
$query="UPDATE ".$tables." ";
$nbchamps=count($champs);
if ($nbchamps!=0)
{
if ($nbchamps==1)
{
$query=$query."SET ".$champs."='".$valeurs."' ";
}
else
{
$query=$query."SET ".$champs[0]."='".$valeurs[0]."'";
for($i=1;$i<$nbchamps;$i++)
{
$query=$query.", ".$champs[$i]."=".$valeurs[$i];
}
}
}
if(!empty($conditions))
{
$query=$query." WHERE ".$conditions;
}
if($this->id_connect != false)
{
$res=@mysql_query($query, $this->id_connect);
if (empty($res))
{
return false;
}
else
{
return @mysql_affected_rows($this->id_connect);
}
}
}
private $db;
public $id_connect;
public $total_req = 0;
}
?>

37
0.7.1/panel/system/core.php Executable file
View File

@@ -0,0 +1,37 @@
<?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.
*/
// Page core du systeme
// Elle contient toute les pages a inclures
// Demarrage de la session
session_start ();
// Inclusion de la classe MySql
require ('system/class/mysql.php');
$MySql = new MySql ('', 'root_panel', 'root_panel', '');
if ( $MySql->id_connect == FALSE ) {die ("Erreur d'execution (01)"); }
// Inclusion des functions
require ('system/function.php');
// Verification des autorisations sur la page
require ('system/librairie/lib.securite.php');
?>

102
0.7.1/panel/system/function.php Executable file
View File

@@ -0,0 +1,102 @@
<?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.
*/
// Page contenant toute les functions
// Function de redirection
function Redirect ($Destination)
{
header ('Location: '.$Destination);
die ("Fin des op<6F>rations");
}
// Function de verificatio des form GET avec regex
function VerifGET ($Get, $Regex, $TailleMIN, $TailleMAX)
{
if ( !empty($_GET[$Get]) )
{
if ( preg_match ($Regex, $_GET[$Get]) )
{
$Taille = strlen($_GET[$Get]);
if ( ($Taille >= $TailleMIN) or ($TailleMIN == 0) )
{
if ( ($Taille <= $TailleMAX) or ($TailleMAX == 0) )
{
return "ChaineValide";
}
else
{
return "ChaineLongue";
}
}
else
{
return "ChaineCourte";
}
}
else
{
return "ChaineInvalide";
}
}
else
{
return "ChaineVide";
}
}
// Function de verificatio des form POST avec regex
function VerifPOST ($Get, $Regex, $TailleMIN, $TailleMAX)
{
if ( !empty($_POST[$Get]) )
{
if ( preg_match ($Regex, $_POST[$Get]) )
{
$Taille = strlen($_POST[$Get]);
if ( ($Taille >= $TailleMIN) or ($TailleMIN == 0) )
{
if ( ($Taille <= $TailleMAX) or ($TailleMAX == 0) )
{
return "ChaineValide";
}
else
{
return "ChaineLongue";
}
}
else
{
return "ChaineCourte";
}
}
else
{
return "ChaineInvalide";
}
}
else
{
return "ChaineVide";
}
}
?>

101
0.7.1/panel/system/javascript.js Executable file
View File

@@ -0,0 +1,101 @@
/*
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.
*/
h = 0;
id = 0;
c = 0;
Menu = 1;
function Derouler()
{
if(h != 0 && id != 0)
{
if(c <= h)
{
if(document.getElementById(id))
{
document.getElementById(id).style.height=c+'px';
c++;
setTimeout("Derouler()", 20);
}
}
}
}
function Voir(div, taille)
{
if(document.getElementById(div))
{
document.getElementById(div).style.display = 'block';
id = div;
h = taille;
Derouler();
}
}
function Cache (div)
{
if ( document.getElementById(div).style.display == "" )
{
document.getElementById(div).style.display = "none";
}
else
{
document.getElementById(div).style.display = "";
}
}
function CacheMenu ()
{
if ( Menu == 0 )
{
document.getElementById('JS_menu').style.display = '';
document.getElementById('contenu').style.width = '82%;';
Menu = 1;
}
else
{
document.getElementById('JS_menu').style.display = 'none';
document.getElementById('contenu').style.width = '100%;';
Menu = 0;
}
}
function ChangeVision (id1, id2)
{
// alert ("DEBUG NOW");
if ( document.getElementById(id1).style.display == '' )
{
document.getElementById(id1).style.display = 'none';
document.getElementById(id2).style.display = '';
}
else
{
document.getElementById(id1).style.display = '';
document.getElementById(id2).style.display = 'none';
}
}

View File

@@ -0,0 +1,223 @@
<?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 domaine
if ( VerifPOST("Adresse", "#^[a-z0-9.-]+\.[a-z]+$#", 5, 120) == "ChaineValide" )
{
if ( VerifPOST("Adresse", "#kelio\.org#", 5, 120) == "ChaineValide")
{
$_SESSION['Resultat'] = "Vous ne pouvez pas utiliser Kelio dans vos domaines !!!";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
else
{
if ( (VerifPOST("Racine", "#^/[a-z0-9/_-]+/$#", 1, 120) == "ChaineValide") or
(VerifPOST("Racine", "#^/$#", 1, 120) == "ChaineValide") )
{
if ( (VerifPOST("BaseDir", "#^/[a-z0-9/_-]+/$#", 1, 120) == "ChaineValide") or
(VerifPOST("BaseDir", "#^/$#", 1, 120) == "ChaineValide") )
{
if ( (VerifPOST("Commentaire", "#^[a-z0-9 ]+$#i", 1, 50) == "ChaineValide") or
(VerifPOST("Commentaire", "#^[a-z0-9]+$#i", 1, 50) == "ChaineVide") )
{
if ( VerifPOST("Listage", "#^Oui|Non$#", 3, 3) == "ChaineValide" )
{
if ( (VerifPOST("mysqldefault_host", "#^[a-z0-9.-]+\.[a-z]+$#", 5, 50) == "ChaineValide") or
(VerifPOST("mysqldefault_host", "#^[a-z0-9.-]+\.[a-z]+$#", 5, 50) == "ChaineVide") )
{
if ( (VerifPOST("mysqldefault_user", "#^[a-z0-9_]+$#", 3, 16) == "ChaineValide") or
(VerifPOST("mysqldefault_user", "#^[a-z0-9_]+$#", 3, 16) == "ChaineVide") )
{
if ( (VerifPOST("mysqldefault_password", "#^[a-z0-9]+$#", 3, 16) == "ChaineValide") or
(VerifPOST("mysqldefault_password", "#^[a-z0-9]+$#", 3, 16) == "ChaineVide") )
{
if ( (VerifPOST("temporaire", "#^/[a-z0-9/_-]+/$#", 1, 120) == "ChaineValide") or
(VerifPOST("temporaire", "#^/[a-z0-9/_-]+/$#", 1, 120) == "ChaineVide") )
{
if ( (VerifPOST("sessions", "#^/[a-z0-9/_-]+/$#", 1, 120) == "ChaineValide") or
(VerifPOST("sessions", "#^/[a-z0-9/_-]+/$#", 1, 120) == "ChaineVide") )
{
if ( VerifPOST("allow_url_fopen", "#^Oui|Non$#", 3, 3) == "ChaineValide" )
{
if ( VerifPOST("allow_url_include", "#^Oui|Non$#", 3, 3) == "ChaineValide" )
{
if ( VerifPOST("display_errors", "#^Oui|Non$#", 3, 3) == "ChaineValide" )
{
if ( VerifPOST("short_open_tag", "#^Oui|Non$#", 3, 3) == "ChaineValide" )
{
if ( VerifPOST("sessionauto_start", "#^Oui|Non$#", 3, 3) == "ChaineValide" )
{
if ( VerifPOST("magic_quotes_gpc", "#^Oui|Non$#", 3, 3) == "ChaineValide" )
{
if ( VerifPOST("register_globals", "#^Oui|Non$#", 3, 3) == "ChaineValide" )
{
$DetecteServeur = $MySql->Select ("*", "utilisateur", "Utilisateur='".$_SESSION['Utilisateur']."'", "", "", "", "");
$VerificatinIP = gethostbyname ($_POST['Adresse']);
if ( $VerificatinIP == gethostbyname($DetecteServeur[0]["ServeurFichier"]) )
{
$VerificationExistance = $MySql->Select ("*", "domaine", "Adresse='".$_POST["Adresse"]."'", "", "", "", "");
if ( $VerificationExistance == FALSE )
{
$Conteneur = "Utilisateur, Adresse, OpenBasedir, Racine, Status, Listage, Commentaire, DateDeCreation, MysqlDefaultHost, MysqlDefaultUser, MysqlDefaultPassword, tmp, sessions, Allow_url_fopen, Allow_url_include, Session_auto_start, Magic_quotes_gpc, Register_globals, DisplayErrors, Short_Open_Tag";
$Contenu = "'".$_SESSION['Utilisateur']."', '".$_POST['Adresse']."', '".$_POST['BaseDir']."', '".$_POST['Racine']."', '1', '".$_POST['Listage']."', '".$_POST['Commentaire']."', '".time()."', '".$_POST['mysqldefault_host']."', '".$_POST['mysqldefault_user']."', '".$_POST['mysqldefault_password']."', '".$_POST['temporaire']."', '".$_POST['sessions']."', '".$_POST['allow_url_fopen']."', '".$_POST['allow_url_include']."', '".$_POST['sessionauto_start']."', '".$_POST['magic_quotes_gpc']."', '".$_POST['register_globals']."', '".$_POST['display_errors']."', '".$_POST['short_open_tag']."'";
$MySql->Insert($Conteneur, $Contenu, domaine);
Redirect ('Page-Domaine-Recapitulatif.html');
}
else
{
$_SESSION['Resultat'] = "Le domaine existe deja sur un des serveurs";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le domaine ne pointe pas sur le serveur";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
} // Fin de la verif register_globals
else
{
$_SESSION['Resultat'] = "L'option php 'register_globals' est incorrecte.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
} // Fin de la verif magic_quotes_gpc
else
{
$_SESSION['Resultat'] = "L'option php 'magic_quotes_gpc' est incorrecte.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
} // Fin de la verif sessionauto_start
else
{
$_SESSION['Resultat'] = "L'option php 'session.auto_start' est incorrecte.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
} // Fin de la verif short_open_tag
else
{
$_SESSION['Resultat'] = "L'option php 'short_open_tag' est incorrecte.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
} // Fin de la verif display_errors
else
{
$_SESSION['Resultat'] = "L'option php 'display_errors' est incorrecte.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
} // Fin de la verif allow_url_include
else
{
$_SESSION['Resultat'] = "L'option php 'allow_url_include' est incorrecte.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
} // Fin de la verif du allow_url_fopen
else
{
$_SESSION['Resultat'] = "L'option php 'allow_url_fopen' est incorrecte.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
} // Fin de la verif du dossier sessions
else
{
$_SESSION['Resultat'] = "Le dossier sessions est invalide. (il doit commencer et finir par /)";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
} // Fin de la verif du dossier temporaire
else
{
$_SESSION['Resultat'] = "Le dossier temporaire est invalide. (il doit commencer et finir par /)";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
} // Fin de la verif sql pass
else
{
$_SESSION['Resultat'] = "Le mot de passe pour la base de donn<6E>es mysql est invalide.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
} // Fin de la verif sql user
else
{
$_SESSION['Resultat'] = "L'utilisateur pour la base de donn<6E>es mysql est invalide.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
} // Fin de la verif sql adresse
else
{
$_SESSION['Resultat'] = "L'adresse du serveur mysql est invalide.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le listage est incorrect.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le commentaire est incorrect.";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le BaseDir est incorrect (il doit commencer et finir par /)";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "La racine est incorrecte (il doit commencer et finir par /)";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
}
}
else
{
$_SESSION['Resultat'] = "L'adresse est incorrecte";
$_SESSION['Lien'] = "Page-Domaine-AjoutDomaineExterne.html";
Redirect ('resultat.html');
}
?>

View 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("Domaine", "#^[a-z0-9.-]+\.[a-z]+$#", 3, 120) == "ChaineValide" )
{
if ( VerifPOST("Confirmation", "#^oui$#", 3, 3) == "ChaineValide" )
{
$VerifExistence = $MySql->Select ("*", "domaine", "Adresse='".$_POST['Domaine']."'", "", "", "", "");
if ( $VerifExistence != FALSE )
{
if ( $VerifExistence[0]["Utilisateur"] == $_SESSION['Utilisateur'] )
{
if ( $VerifExistence[0]["Status"] == "2" )
{
$UpdateDB = $MySql->Update ("domaine", "Status", "3", "Adresse='".$_POST['Domaine']."'");
Redirect ('Page-Domaine-Recapitulatif.html');
}
else
{
$_SESSION['Resultat'] = "Ce domaine n'est pas activ<69> (ou deja en cours de suppression)";
$_SESSION['Lien'] = "Page-Domaine-SuppressionDomaineExterne.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Monsieur veut la jouer h4X00R ?";
$_SESSION['Lien'] = "Page-Domaine-SuppressionDomaineExterne.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Ce domaine n'existe pas";
$_SESSION['Lien'] = "Page-Domaine-SuppressionDomaineExterne.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le code de confirmation est incorrect";
$_SESSION['Lien'] = "Page-Domaine-SuppressionDomaineExterne.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Aucun domaine n'est selection<6F>";
$_SESSION['Lien'] = "Page-Domaine-SuppressionDomaineExterne.html";
Redirect ('resultat.html');
}
?>

View 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');
}
?>

View 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');
}
?>

View 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');
}
?>

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');
}
?>

View File

@@ -0,0 +1,54 @@
<?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.
*/
if ( VerifPOST("login", "#^[a-z0-9]+$#i", 3, 9) == "ChaineValide" )
{
if ( VerifPOST("pass", "#^[a-z0-9]+$#i", 3, 25) == "ChaineValide" )
{
$VerifLogin = $MySql->Select ("*", "utilisateur", "Utilisateur='".strtolower($_POST['login'])."'", "", "", "", "");
if ( $VerifLogin != FALSE )
{
if ( $VerifLogin[0]["Password"] == md5(md5($_POST['pass'])) )
{
$_SESSION['Utilisateur'] = $VerifLogin[0]["Utilisateur"];
$_SESSION['Hash'] = $VerifLogin[0]["Password"];
Redirect ('Page.html');
}
else
{
Redirect ('http://www.kelio.org#Mauvais_Password');
}
}
else
{
Redirect ('http://www.kelio.org#Login_Inexistant');
}
}
else
{
Redirect ('http://www.kelio.org#Syntaxe_Incorrecte');
}
}
else
{
Redirect ('http://www.kelio.org#Syntaxe_Incorrecte');
}
?>

View File

@@ -0,0 +1,53 @@
<?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.
*/
// Page contenant la gestion des pages
if ( VerifGET ("id", "#[a-z]+#i", 3, 30) == "ChaineValide" )
{
if ( VerifGET("ids", "#[a-z]+#i", 3, 30) == "ChaineValide" )
{
$SelectPage = $MySql->Select ("*", "page", "Page1='".$_GET['id']."' AND Page2='".$_GET['ids']."'", "", "", "", "");
if ( $SelectPage != FALSE )
{
if ( $SelectPage[0]["Activation"] == "oui" )
{
require ($SelectPage[0]["Chemin"]);
}
else
{
require ('module/erreur/desactive.php');
}
}
else
{
require ('module/erreur/inconnu.php');
}
}
else
{
require ('module/accueil.php');
}
}
else
{
require ('module/accueil.php');
}
?>

View File

@@ -0,0 +1,59 @@
<?php
// Page contenant la verification de l'existance du login
/*
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.
*/
function VerifDroit ()
{
global $MySql;
if ( isset($_SESSION['Utilisateur']) && isset($_SESSION['Hash']) )
{
$SelectUtilisateur = $MySql->Select ("*", "utilisateur", "Utilisateur='".$_SESSION['Utilisateur']."'", "", "", "", "");
if ( $SelectUtilisateur != FALSE )
{
if ( $SelectUtilisateur[0]["Password"] != $_SESSION['Hash'] )
{
//session_destroy ();
Redirect ('http://www.kelio.org#s1');
}
else
{
$UpdateInfo = $MySql->Update ("utilisateur", array("AdresseIP", "DernierLogin"), array($_SERVER['REMOTE_ADDR'], time()), "Utilisateur='".$_SESSION['Utilisateur']."'");
}
}
else
{
//session_destroy ();
Redirect ('http://www.kelio.org#s2');
}
}
else
{
//session_destroy ();
Redirect ('http://www.kelio.org#s3');
}
}
function VerifProvenance ($Provenance)
{
if ( !preg_match("#".addslashes($Provenance)."#i", $_SERVER['HTTP_REFERER']) )
{
Redirect ('http://www.kelio.org#5');
}
}
?>

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 d'ajout de base de donn<6E>e
if ( VerifPOST("Nom", "#^[a-z0-9]+$#", 3, 6) == "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"))
{
$NomBase = str_replace('_','',$_POST['Nom']);
$NomBase = str_replace(' ','',$NomBase);
$MdpBase = str_replace('_','',$_POST['MotDePasse']);
$MdpBase = str_replace(' ','',$MdpBase);
$VerificationExistance = $MySql->Select ("*", "basededonnee", "Nom='".$_SESSION['Utilisateur']."_".$NomBase."'", "", "", "", "");
if ( $VerificationExistance == FALSE )
{
$Conteneur = "Utilisateur, Nom, Password, Commentaire, DateDeCreation";
$Contenu = "'".$_SESSION['Utilisateur']."', '".$_SESSION['Utilisateur']."_".$NomBase."', '".$MdpBase."', '".$_POST['Commentaire']."', '".time()."'";
$MySql->Insert ($Conteneur,$Contenu, "basededonnee");
Redirect ('Page-MySql-Recapitulatif.html');
}
else
{
$_SESSION['Resultat'] = "Cette base de donn<6E>es existe deja";
$_SESSION['Lien'] = "Page-MySql-AjoutBdd.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le commentaire est incorrect";
$_SESSION['Lien'] = "Page-MySql-AjoutBdd.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le mot de passe est incorrect";
$_SESSION['Lien'] = "Page-MySql-AjoutBdd.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le nom de la base de donn<6E>es est incorrect";
$_SESSION['Lien'] = "Page-MySql-AjoutBdd.html";
Redirect ('resultat.html');
}
?>

View File

@@ -0,0 +1,73 @@
<?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 de suppression de base de donn<6E>es
if ( VerifPOST("Base", "#^[a-z0-9]+_[a-z0-9]+$#", 3, 25) == "ChaineValide" )
{
if ( VerifPOST("MotDePasse", "#^[a-z0-9]+$#", 3, 9) == "ChaineValide" )
{
$VerifExistence = $MySql->Select ("*", "basededonnee", "Nom='".$_POST['Base']."'", "", "", "", "");
if ( $VerifExistence != FALSE )
{
if ( $VerifExistence[0]["Utilisateur"] == $_SESSION['Utilisateur'] )
{
if ( $VerifExistence[0]["Status"] == "2" )
{
$UpdateDB = $MySql->Update ("basededonnee", "Status", "3", "Nom='".$_POST['Base']."'");
Redirect ('Page-MySql-Recapitulatif.html');
}
else
{
$_SESSION['Resultat'] = "Cette base de donn<6E>e n'est pas activ<69>e (ou deja en cours de suppression)";
$_SESSION['Lien'] = "Page-MySql-SuppressionBdd.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Monsieur veut la jouer h4X00R ?";
$_SESSION['Lien'] = "Page-MySql-SuppressionBdd.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Cette base de donn<6E>es n'existe pas";
$_SESSION['Lien'] = "Page-MySql-SuppressionBdd.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Le mot de passe est incorrect";
$_SESSION['Lien'] = "Page-MySql-SuppressionBdd.html";
Redirect ('resultat.html');
}
}
else
{
$_SESSION['Resultat'] = "Aucune bdd n'a <20>t<EFBFBD> s<>lectionn<6E>e";
$_SESSION['Lien'] = "Page-MySql-SuppressionBdd.html";
Redirect ('resultat.html');
}
?>