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 128 129 130 131 132 133
|
<!---------------------------------------------------------------->
<!--------------------------------------------------------------->
<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="">
<?php
//--- Connexion à la base de données ecocountoxchge ---//
mysql_connect("mysql5-3","*****","******");
mysql_selectdb("******") or die("Connexion impossible");
$sel=$_POST['distrib'];
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= ( isset($_POST['distri']) && ($_POST['distri'] == $ligne['NomDistributeur'])) ? ' selected="selected" ':' ';
echo '<option' .$sel.'value="'.$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
$sel1=$_POST['domained'];
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= ( isset($_POST['domaine']) && ($_POST['domaine'] == $ligne1['NomDomaine'])) ? ' selected="selected" ':' ';
echo '<option '.$sel1. ' value="'.$ligne1["NomDomaine"].'">'.$ligne1["NomDomaine"].'</option>';
}
?>
<input type="text" name="distrib" value="<?echo($_POST['distri'])?>">
<input type="submit" name="bnvalider" value="Valider">
</form>
<form name="formaccesse" method="POST" action="action.php">
<!--<input type="text" name="distrib" value="<?echo($_POST['distri'])?>"> -->
<input type="text" name="champnomdomaine" size="20">
<input type="submit" value="Ajouter un domaine" name="envoyerdomaine">
</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">
Nombre de compteurs maximum autorisés
<form method="post" name="medi" action="action.php">
<input type="submit" name="moins" value="-">
<?php
//--- 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é") ;
$ligne2=mysql_fetch_array($requete2);
//{
?>
<input type="text" name="NbCompteur" align="center" value="<? echo $ligne2["NbMaxCompteurs"] ?>" readonly="readonly" ><?
//}
?>
<input type="text" name="domaine" value="<?echo$_POST['domaine']?>">
<input type="submit" name="plus" value="+">
</form>
</td>
</td>
</tr>
<tr>
<td class="principal" width="273" height="106"> Ajouter un compteur: </td>
<td class="principal" width="467" height="106">
<form method="post" name="medi" action="action.php">
<input type="text" name="numtel" value="">
<input type="text" name="datevalidite" value="">
<input type="submit" name="ajoutcompteur" value="Ajouter le compteur">
</form>
</td>
</td>
</tr>
<?php
$resultat=mysql_query("SELECT NomDistributeur,NomDomaine,NbMaxCompteurs,NumTelephone,DateDebutValidite,Operateur,NumClient FROM gestionabonnements WHERE NomDomaine='$domaine'");
?>
<table border=3 align="center">
<tr><td>Nom du distributeur</td><td>Nom du domaine</td><td>Nombre Maximum de compteurs</td><td>Numéro de téléphone</td><td>Date de début de validité</td><td>Opérateur</td><td>Numéro de client</td></tr>
<?
while($tab=mysql_fetch_row($resultat))
{
echo "<tr>";
for($i=0;$i<mysql_num_fields($resultat);$i++)
{
echo "<td><center>$tab[$i]</center></td>";
}
echo "</tr>";
}
?>
</table>
</table>
<center><a href="index.html">Retour au sommaire </a></center>
</BODY>
</HTML> |