Migration
This commit is contained in:
54
0.8.0/module/mysql/ajoutbdd.php
Executable file
54
0.8.0/module/mysql/ajoutbdd.php
Executable 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.
|
||||
*/
|
||||
$CountDB = $MySql->Count('id', 'basededonnee', "Utilisateur='{$_SESSION['Utilisateur']}'");
|
||||
?>
|
||||
<h3>Ajouter une base de donn<6E>es</h3>
|
||||
<p>
|
||||
Le nom de votre base de donn<6E>es ne doit contenir que les caract<63>res a-z et 0-9 (3 caract<63>res minimum et 6 maximum).<br />
|
||||
Au nom de votre base de donn<6E>es, sera rajout<75> automatiquement le pr<70>fixe : "<?php echo $_SESSION['Utilisateur'] ; ?>_" <br />
|
||||
Le mot de passe pour acc<63>der <20> cette nouvelle base de donn<6E>es ne sera pas crypt<70>, et accessible depuis le r<>capitulatif.<br />
|
||||
Le mot de passe, tout comme le nom, ne doit contenir que les caract<63>res a-z et 0-9 (3 caract<63>res minimum et 9 maximum).
|
||||
</p>
|
||||
|
||||
<?php if (($CountDB < $_SESSION['Offre']['BaseDeDonnees']) or ($_SESSION['Offre']['BaseDeDonnees'] == '-1')): ?>
|
||||
<div style="width: 500px; margin: auto">
|
||||
<form action="execution-2.html" method="post">
|
||||
<table width="500" cellpadding="5">
|
||||
<tr>
|
||||
<td style="width:100px">Nom :</td>
|
||||
<td style="width:400px"><?php echo $_SESSION['Utilisateur'] ; ?>_<input name="Nom" type="text" style="border: 0; border-bottom: #006633 1px solid; width:90%" maxlength="6" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mot de passe :</td>
|
||||
<td><input name="MotDePasse" type="text" style="border: 0; border-bottom: #006633 1px solid; width:100%;" maxlength="9" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Commentaire :</td>
|
||||
<td><input name="Commentaire" type="text" style="border: 0; border-bottom: #006633 1px solid; width:100%;" maxlength="50" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="text-align: center; width: 100%; margin-top: 20px;">
|
||||
<input type="submit" name="Submit" value="Cr<43>er la base de donn<6E>es" style=" border: #006633 1px solid;" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<p>D<>sol<6F>, vous ne pouvez plus ajouter de base(s) de donn<6E>es. Votre offre ne vous le permet pas.</p>
|
||||
<?php endif;?>
|
||||
100
0.8.0/module/mysql/recapitulatif.php
Executable file
100
0.8.0/module/mysql/recapitulatif.php
Executable file
@@ -0,0 +1,100 @@
|
||||
<?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 ("*", "basededonnee", "Utilisateur='".$_SESSION['Utilisateur']."'", "", "", "", "");
|
||||
$CountTable = count ($ListTable);
|
||||
if ( $ListTable == FALSE ) { $CountTable = 0; }
|
||||
?>
|
||||
<h3>
|
||||
R<EFBFBD>capitulatif de vos bases de donn<6E>es MySql
|
||||
<a style="border: 0px;" href="http://doc.kelio.org/gerer_les_bases_de_donnees"><img style="vertical-align:middle; border: 0px;" src="image/icons/question.png" alt="Aide" title="Aide" /></a>
|
||||
</h3>
|
||||
<p>
|
||||
Actuellement, vous avez <?php echo $CountTable; ?> base(s) de donn<6E>es<?php if ($_SESSION['Offre']['BaseDeDonnees'] != '-1'):?> sur <?php echo $_SESSION['Offre']['BaseDeDonnees']; ?> autoris<69>e(s)<?php endif;?>.
|
||||
</p>
|
||||
<p>
|
||||
Passez votre souris sur le commentaire pour le voir en entier.<br /><br />
|
||||
Le statut "Cr<43>ation" signifie que votre base de donn<6E>es est en attente de cr<63>ation par notre robot. <br />
|
||||
Normalement, cette op<6F>ration prend moins d'une heure.<br />
|
||||
Il en est de meme pour le statut "Suppression".
|
||||
</p>
|
||||
<div style="border:#006633 1px solid; width: 90%; margin: auto; margin-top: 15px;">
|
||||
<table style="width:100%;">
|
||||
<tr>
|
||||
<td class="Tableau1" style="text-align: center; width: 15%;"><strong>Nom</strong></td>
|
||||
<td class="Tableau1" style="text-align: center; width: 20%;"><strong>Date</strong></td>
|
||||
<td class="Tableau1" style="text-align: center; width: 15%;"><strong>Statut</strong></td>
|
||||
<td class="Tableau1" style="text-align: center; width: 20%;"><strong>Mot de passe</strong></td>
|
||||
<td class="Tableau1" style="text-align: center; width: 30%;"><strong>Commentaire</strong></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
if ( $ListTable == FALSE )
|
||||
{
|
||||
echo '
|
||||
<tr><td class="Tableau1" style="text-align: center; width: 100%;" colspan="5">Aucune base de donn<6E>es pour le moment</td></tr>' ;
|
||||
}
|
||||
else
|
||||
{
|
||||
for ($i=0; $i < $CountTable; $i++)
|
||||
{
|
||||
if ( $ListTable[$i]["Status"] == "1" )
|
||||
{
|
||||
$Status = "Creation";
|
||||
}
|
||||
elseif ( $ListTable[$i]["Status"] == "2" )
|
||||
{
|
||||
$Status = "Activ<69>";
|
||||
}
|
||||
elseif ( $ListTable[$i]["Status"] == "3" )
|
||||
{
|
||||
$Status = "Suppression";
|
||||
}
|
||||
else
|
||||
{
|
||||
$Status = "Erreur";
|
||||
}
|
||||
|
||||
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"];
|
||||
}
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
<td class="Tableau1" style="text-align: center; width: 15%;">'.$ListTable[$i]["Nom"].'</td>
|
||||
<td class="Tableau1" style="text-align: center; width: 15%;"><span style="cursor: pointer" title="'.date ("d-m-Y H:i:s",$ListTable[$i]["DateDeCreation"]).'">'.date("d-m-Y", $ListTable[$i]["DateDeCreation"]).'</span></td>
|
||||
<td class="Tableau1" style="text-align: center; width: 15%;">'.$Status.'</td>
|
||||
<td class="Tableau1" style="text-align: center; width: 15%;">'.$ListTable[$i]["Password"].'</td>
|
||||
<td class="Tableau1" style="text-align: center; width: 55%;"><span style="cursor: pointer" title="'.$ListTable[$i]["Commentaire"].'">'.$Commentaire.'</span></td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
67
0.8.0/module/mysql/suppressionbdd.php
Executable file
67
0.8.0/module/mysql/suppressionbdd.php
Executable file
@@ -0,0 +1,67 @@
|
||||
<?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 ("*", "basededonnee", "Utilisateur='".$_SESSION['Utilisateur']."' AND Status='2'", "", "", "", "");
|
||||
|
||||
?>
|
||||
<h3>Supprimer une base de donn<6E>es</h3>
|
||||
<p>
|
||||
Attention, une fois votre base de donn<6E>es supprim<69>e, vous ne pourrez plus revenir sur votre choix.<br />
|
||||
Pensez <20> faire une sauvegarde avant de la mettre en attente de suppression.
|
||||
<br /> Seules les bases de donn<6E>es ayant leur statut "activ<69>" peuvent <20>tre supprim<69>es. Si ce n'est pas le cas, veuillez attendre que leur statut passe <20> "activ<69>"<br />
|
||||
Afin d'<27>viter toute erreur, vous devrez entrer le mot de passe de celle-ci. (vous pouvez le voir sur la page "R<>capitulatif").
|
||||
</p>
|
||||
|
||||
<div style="width: 500px; margin: auto">
|
||||
<form action="execution-3.html" method="post">
|
||||
<table width="500" cellpadding="5">
|
||||
<tr>
|
||||
<td style="width:150px">Base <20> supprimer :</td>
|
||||
<td style="width:350px">
|
||||
<select name="Base" style="border: 0; border-bottom: #006633 1px solid; width:100%;">
|
||||
<option selected="selected" value="">S<>lectionnez</option>
|
||||
<?php
|
||||
if ( $ListTable == FALSE)
|
||||
{
|
||||
$TotalEnregistement = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$TotalEnregistement = count ($ListTable);
|
||||
}
|
||||
|
||||
for ($i=0; $i < $TotalEnregistement; $i++)
|
||||
{
|
||||
echo "<option value='".$ListTable[$i]["Nom"]."'>".$ListTable[$i]["Nom"]."</option>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mot de passe :</td>
|
||||
<td><input name="MotDePasse" type="text" style="border: 0; border-bottom: #006633 1px solid; width:100%;" maxlength="9" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="text-align: center; width: 100%; margin-top: 20px;">
|
||||
<input type="submit" name="Submit" value="Supprimer la base de donn<6E>es" style=" border: #006633 1px solid;" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
Reference in New Issue
Block a user