319 lines
6.5 KiB
PHP
Executable File
319 lines
6.5 KiB
PHP
Executable File
<?php
|
|
session_start();
|
|
$idfamille=$HTTP_POST_VARS["idfamille"];
|
|
$idcateg=$HTTP_POST_VARS["idcateg"];
|
|
$page=$HTTP_POST_VARS["page"];
|
|
?>
|
|
<html>
|
|
<head>
|
|
<title>
|
|
Partie Membre
|
|
</title>
|
|
<link href="../style.css" rel="stylesheet" type="text/css">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
|
|
<!--
|
|
a:link {
|
|
color: #FFFFFF;
|
|
text-decoration: underline;
|
|
}
|
|
a:visited {
|
|
color: #FFFFFF;
|
|
text-decoration: underline;
|
|
}
|
|
a:hover {
|
|
color: #FFFFFF;
|
|
text-decoration: none;
|
|
}
|
|
a:active {
|
|
color: #FFFFFF;
|
|
text-decoration: underline;
|
|
}
|
|
-->
|
|
</style>
|
|
</head>
|
|
<body class="bgcolor" text="white">
|
|
<h3><br><b>Votre Profil </b></h3>
|
|
<div align="left">
|
|
<?php
|
|
|
|
if (isset($_SESSION['client']))
|
|
{
|
|
require("../connexion.php");
|
|
$conn = mysql_connect($host, $user, $password);
|
|
mysql_select_db($bdd) or die("Impossible d'ouvrir la base de donnee $bdd");
|
|
|
|
$requete = "select client.idcli,logincli,mdpcli,nomcli,prenomcli,societe,telfixe,telport,fax,email,typecli,societe,civilite,coordbanc,etatcli,totalcom from client where client.idcli='$idcli'";
|
|
$result=mysql_query($requete) or die ("Erreur SQL :$requete<br>".mysql_error()."...");
|
|
|
|
$requete2 = "select idadr,libelleadr,typead,codepostal,ville,pays from adresse where idcli='$idcli'";
|
|
$result2=mysql_query($requete2) or die ("Erreur SQL :$requete<br>".mysql_error()."...");
|
|
|
|
while ($ligne=mysql_fetch_row($result2))
|
|
{
|
|
$idadr=$ligne[0];
|
|
$libelleadr=$ligne[1];
|
|
$typead=$ligne[2];
|
|
$codepostal=$ligne[3];
|
|
$ville=$ligne[4];
|
|
$pays=$ligne[5];
|
|
}
|
|
|
|
while ($ligne=mysql_fetch_row($result))
|
|
{
|
|
$idcli=$ligne[0];
|
|
$logincli=$ligne[1];
|
|
$mdpcli=$ligne[2];
|
|
$nomcli=$ligne[3];
|
|
$prenomcli=$ligne[4];
|
|
$societe=$ligne[5];
|
|
$telfixe=$ligne[6];
|
|
$telport=$ligne[7];
|
|
$fax=$ligne[8];
|
|
$email=$ligne[9];
|
|
$typecli=$ligne[10];
|
|
$societe=$ligne[11];
|
|
$civilite=$ligne[12];
|
|
$coordbanc=$ligne[13];
|
|
$etatcli=$ligne[14];
|
|
$totalcom=$ligne[15];
|
|
}
|
|
print "select type client : $selecttypecli";
|
|
?>
|
|
|
|
<form name="f1" action="modifcompte.php" method="post">
|
|
<table border=0>
|
|
<tr>
|
|
<td>
|
|
Prenom :
|
|
</td>
|
|
<td>
|
|
<input type="text" name="prenomcli" value="<?php print $prenomcli;?>"/>
|
|
</td>
|
|
<td>
|
|
Login :
|
|
</td>
|
|
<td>
|
|
<input type="text" name="logincli" value="<?php print $logincli;?>"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Nom :
|
|
</td>
|
|
<td>
|
|
<input type="hidden" name="idprod" value="<?php print "$idprod";?>"/>
|
|
<input type="hidden" name="idfamille" value="<?php print $idfamille?>"/>
|
|
<input type="hidden" name="idcateg" value="<?php print $idcateg?>"/>
|
|
<input type="text" name="nomcli" value="<?php print $nomcli;?>"/>
|
|
</td>
|
|
<td>
|
|
Mot de passe :
|
|
</td>
|
|
<td>
|
|
<input type="text" name="mdpcli" value="<?php print $mdpcli;?>"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Tel. fixe :
|
|
</td>
|
|
<td>
|
|
<input type="text" name="telfixe" value="<?php print $telfixe;?>"/>
|
|
</td>
|
|
<td>
|
|
Tel. Portable :
|
|
</td>
|
|
<td>
|
|
<input type="text" name="telport" value="<?php print $telport;?>"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
FAX :
|
|
</td>
|
|
<td>
|
|
<input type="text" name="fax" value="<?php print $fax;?>"/>
|
|
</td>
|
|
<td colspan=2>
|
|
 
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
E-m@il
|
|
</td>
|
|
<td>
|
|
<input type="text" name="email" value="<?php print $email?>"/>
|
|
</td>
|
|
<td colspan=2>
|
|
 
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td> </td>
|
|
<td>Société :
|
|
</td>
|
|
<td>
|
|
<input type="text" name="societe" value="<?php print $societe;?>"/>
|
|
</td>
|
|
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<br>
|
|
<h3><b>Adresse de livraison</b></h3>
|
|
<table border=0>
|
|
<tr>
|
|
<td>
|
|
Libelle :
|
|
</td>
|
|
<td colspan=3>
|
|
<input type="text" size=49 name="libelleadr" value="<?php print $libelleadr;?>"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Code postal :
|
|
</td>
|
|
<td>
|
|
<input type="text" name="codepostal" value="<?php print $codepostal;?>"/>
|
|
</td>
|
|
<td>
|
|
Ville :
|
|
</td>
|
|
<td>
|
|
<input type="text" name="ville" value="<?php print $ville;?>"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td >
|
|
Pays :
|
|
</td>
|
|
<td height="29" width="400">
|
|
<select name="pays">
|
|
<?php
|
|
if ($pays=="France")
|
|
{
|
|
?>
|
|
<option selected="selected" value="France">France</option>
|
|
<?php
|
|
}
|
|
else
|
|
{
|
|
?>
|
|
<option>France</option>
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
if ($pays=="Belgique")
|
|
{
|
|
?>
|
|
<option selected="selected">Belgique</option>
|
|
<?php
|
|
}
|
|
else
|
|
{
|
|
?>
|
|
<option value="Belgique">Belgique</option>
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
if ($pays=="Royaume-Uni")
|
|
{
|
|
?>
|
|
<option selected="selected" value="Royaume-Uni">Royaume-Uni</option>
|
|
<?php
|
|
}
|
|
else
|
|
{
|
|
?>
|
|
<option value="Royaume-Uni">Royaume-Uni</option>
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
if ($pays=="Suisse")
|
|
{
|
|
?>
|
|
<option selected="selected" value="Suisse">Suisse</option>
|
|
<?php
|
|
}
|
|
else
|
|
{
|
|
?>
|
|
<option value="Suisse">Suisse</option>
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
if ($pays=="Italie")
|
|
{
|
|
?>
|
|
<option selected="selected" value="Italie">Italie</option>
|
|
<?php
|
|
}
|
|
else
|
|
{
|
|
?>
|
|
<option value="Italie">Italie</option>
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
if ($pays=="Espagne")
|
|
{
|
|
?>
|
|
<option selected="selected" value="Espagne">Espagne</option>
|
|
<?php
|
|
}
|
|
else
|
|
{
|
|
?>
|
|
<option value="Espagne">Espagne</option>
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
if ($pays=="Allemagne")
|
|
{
|
|
?>
|
|
<option selected="selected" value="Allemagne">Allemagne</option>
|
|
<?php
|
|
}
|
|
else
|
|
{
|
|
?>
|
|
<option value="Allemagne">Allemagne</option>
|
|
<?php
|
|
}
|
|
?>
|
|
</select>
|
|
</td>
|
|
<td colspan=3>
|
|
<input type="hidden" name="idcli" value="<?php print $idcli?>"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan=4>
|
|
<div align="center">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<input type="submit" value="Modifier">
|
|
</form>
|
|
|
|
<?php
|
|
} else {
|
|
print "<tr><td colspan=4><a href=\"login.php\">Une erreure s'est produite veuillez vous reconnecter</a></td></tr>";
|
|
session_destroy();
|
|
}
|
|
?>
|
|
<br><br><a href="index.php?loguer=oui&<?php print session_name();?>=<?php print session_id();?>">Retour</a>
|
|
</div>
|
|
</body>
|
|
</html>
|