1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
| <!---------------------------------------------------------------->
<!--------------------------------------------------------------->
<HTML>
<HEAD>
<TITLE>
GESTION DES ABONNEMENTS ECO GSM
</TITLE>
</HEAD>
<BODY BGCOLOR=#ECF4DA>
<table width="750" border="0" height="350" align="center">
<tr>
<td colspan="2" class="titre" height="94"><center><font size=10 color=#006465> Gestion des abonnements Eco GSM</font></center></td>
</tr>
<tr>
<td class="principal" width="273" height="99"> Choisissez un distributeur dans la liste. Si celui-ci n'y figure pas, veuillez l'ajouter.
<td class="principal" width="467" height="99">
<form method="post" name="formu" action="<?echo $PHP_SELF;?>">
<?php
//--- Connexion à la base de données ecocountoxchge ---//
mysql_connect("mysql5-3","*******","****");
mysql_selectdb("******") or die("Connexion impossible");
echo('<select name="distri">');
//--- Exécution de la requête de sélection des différents distributeurs ---//
$requete=mysql_query("SELECT DISTINCT NomDistributeur FROM gestionabonnements ORDER BY NomDistributeur") or die ("requète non executé") ;?>
<br>
<?
while($ligne=mysql_fetch_array($requete))
{
$sel='';
if ( isset($_POST['distri']) )
{
if ( $_POST['distri'] == $ligne['NomDistributeur'] )
{
$sel='selected="selected"';
}
}
echo '<option '.$sel. 'name='.$ligne["NomDistributeur"].'>'.$ligne["NomDistributeur"].'</option>';
}
echo('</select>');
?>
<input type="submit" name="bnsubmit" value="Valider" >
</form>
<form name="formaccess" method="POST" action="action.php">
<input type="text" name="champnomdistributeur" size="20">
<input type="submit" value="Ajouter un distributeur" name="envoyer">
</form>
</td>
</tr>
</td>
<tr>
<td class="principal" width="273" height="106"> Choisissez un domaine dans la liste. Si celui-ci n'y figure pas, veuillez l'ajouter. </td>
<td class="principal" width="467" height="106">
<form method="post" name="med" action="">
<?php
echo('<select name="domaine">');
//--- Exécution de la requête de sélection des différents domaines ---//
$requete1=mysql_query("SELECT NomDomaine FROM gestionabonnements WHERE NomDistributeur='$distri'") or die ("requète non executé") ;
?>
<br>
<?
while ($ligne1=mysql_fetch_array($requete1))
{
$sel1='';
if ( isset($_POST['domaine']) )
{
if ( $_POST['domaine'] == $ligne1['NomDomaine'] )
{
$sel1='selected="selected"';
}
}
echo '<option '.$sel1. 'name='.$ligne1["NomDomaine"].'>'.$ligne1["NomDomaine"].'</option>';
}
?>
<input type="submit" name="bnvalider" value="Valider">
</form>
<form name="formaccesse" method="POST" action="action.php">
<input type="text" name="champnomdomaine" size="20">
<input type="submit" value="Ajouter un domaine" name="envoyerdomaine">
<input type="hidden" name="distrib" value=" <?php echo $_POST['distri'] ?> ">
</form>
</td>
</td>
</tr>
<tr>
<td class="principal" width="273" height="106"> Choisissez un dans la liste: </td>
<td class="principal" width="467" height="106">
<form method="post" name="medi" action="">
<?php
echo('<select name="NbCompteur">');
//--- Exécution de la requête de sélection du nombre de compteurs max autorisés ---//
$requete2=mysql_query("SELECT NbMaxCompteurs FROM gestionabonnements WHERE NomDomaine= '$domaine'") or die ("requète non executé") ;
?>
<br>
<?
while ($ligne2=mysql_fetch_array($requete2))
{
$sel2='';
if ( isset($_POST['NbCompteur']) )
{
if ( $_POST['NbCompteur'] == $ligne2['NbMaxCompteurs'] )
{
$sel2='selected="selected"';
}
}
echo '<option '.$sel2. 'name='.$ligne2["NbMaxCompteurs"].'>'.$ligne2["NbMaxCompteurs"].'</option>';
}
?>
<input type="submit" name="bnvalidere" value="Valider">
</form>
<form name="formajout" method="POST" action="action.php">
<input type="text" name="champnomdomaine" size="20">
<input type="text" name="champnomdomaine" size="20">
<input type="submit" value="Ajouter un domaine" name="envoyerdomaine">
</form>
</td>
</td>
</tr>
</table>
</BODY>
</HTML> |