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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
| <?php session_start(); ?>
<?php require_once('../Connections/orientalartdeco.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE table_compte_client SET Nom=%s, Prénom=%s, Adresse=%s, Code_postal=%s, Ville=%s, Téléphone=%s, Email=%s, Login=%s, `Mot _de_ passe`=%s WHERE Idclient=%s",
GetSQLValueString($_POST['Nom'], "text"),
GetSQLValueString($_POST['Prénom'], "text"),
GetSQLValueString($_POST['Adresse'], "text"),
GetSQLValueString($_POST['Code_postal'], "int"),
GetSQLValueString($_POST['Ville'], "text"),
GetSQLValueString($_POST['Téléphone'], "int"),
GetSQLValueString($_POST['Email'], "text"),
GetSQLValueString($_POST['Login'], "text"),
GetSQLValueString($_POST['Mot__de__passe'], "text"),
GetSQLValueString($_POST['Idclient'], "int"));
mysql_select_db($database_orientalartdeco, $orientalartdeco);
$Result1 = mysql_query($updateSQL, $orientalartdeco) or die(mysql_error());
$updateGoTo = "index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo)); erreur sur cette ligne apparemment
}
$colname_Modification = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_Modification = (get_magic_quotes_gpc()) ? $_SESSION['MM_Username'] : addslashes($_SESSION['MM_Username']);
}
mysql_select_db($database_orientalartdeco, $orientalartdeco);
$query_Modification = sprintf("SELECT * FROM table_compte_client WHERE Email = '%s'", $colname_Modification);
$Modification = mysql_query($query_Modification, $orientalartdeco) or die(mysql_error());
$row_Modification = mysql_fetch_assoc($Modification);
$totalRows_Modification = mysql_num_rows($Modification);
?>
<html>
<head>
<title>www.orientalartdeco.com Modification </title>
<meta name="generator" content="Namo WebEditor v5.0(Trial)" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="white" text="black" alink="red">
<p align="center"><img src="logo.gif" width="962" height="57" border="0" /></p>
<div class="Style12" id="Layer33">
<div align="left" class="Style13"><a href="signup.php">Déja client</a></div>
</div>
<p align="right"><span style="font-size:16pt;"><b><i><span class="Style20"></span><font color="yellow"> </font></i></b></span><span style="font-size:16pt;"><b><i><font color="yellow">
</font></i></b></span><span style="font-size:16pt;"><b><i><font color="yellow"> </font></i></b></span><a href="procheorientdeco.htm"></a> <b><i><font color="yellow"> </font></i></b></p>
<p> </p>
<div class="Style10" id="Layer32">
<div align="left"><a href="create.php" class="Style13">inscription en ligne</a></div>
</div>
<p align="center"><b><i><span style="font-size:48pt;"> </span><span style="font-size:16pt;"> </span></i></b></p>
<DIV class=Style5 id=Layer1>
<P align=center class="Style15 Style20">Modifier vos données personnelles </P>
</DIV>
<div class="Style21" id="Layer44">
<div align="center">Copyright 2007 tous droits réservés www.orientalartdeco.com </div>
</div>
<div id="Layer47">
<form method="post" name="form1" action="<?php echo $editFormAction; ?>">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">Nom:</td>
<td><input name="Nom" type="text" value="<?php echo $row_Modification['Nom']; ?>" size="32" maxlength="50"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Prénom:</td>
<td><input name="Prénom" type="text" id="Prénom" value="<?php echo $row_Modification['Prénom']; ?>" size="32" maxlength="50"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Adresse:</td>
<td><input name="Adresse" type="text" value="<?php echo $row_Modification['Adresse']; ?>" size="32" maxlength="100"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Code_postal:</td>
<td><input name="Code_postal" type="text" value="<?php echo $row_Modification['Code_postal']; ?>" size="32" maxlength="5"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Ville:</td>
<td><input name="Ville" type="text" value="<?php echo $row_Modification['Ville']; ?>" size="32" maxlength="40"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Téléphone:</td>
<td><input name="Téléphone" type="text" id="Téléphone" value="<?php echo $row_Modification['Téléphone']; ?>" size="32" maxlength="10"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Email:</td>
<td><input name="Email" type="text" value="<?php echo $row_Modification['Email']; ?>" size="32" maxlength="50"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Login:</td>
<td><input name="Login" type="text" value="<?php echo $row_Modification['Login']; ?>" size="32" maxlength="20"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Mot _de_ passe:</td>
<td><input name="Mot__de__passe" type="text" value="<?php echo $row_Modification['Mot _de_ passe']; ?>" size="32" maxlength="20"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td><input type="submit" value="Mettre à jour l'enregistrement"></td>
</tr>
</table>
<input type="hidden" name="Idclient" value="<?php echo $row_Modification['Idclient']; ?>">
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="Idclient" value="<?php echo $row_Modification['Idclient']; ?>">
</form>
<p> </p>
</div>
<p> </p>
<div class="Style10" id="Layer34">
<div align="right"><a href="mode_de_paiement.php">Modes de paiements </a></div>
</div>
<div class="Style10" id="Layer35">
<div align="right"><a href="aide en ligne.php">Aide en ligne </a></div>
</div>
<div class="Style10" id="Layer36"><a href="SERVICES.php">Plans de travail sur mesure </a></div>
<div class="Style10" id="Layer37">
<div align="right"><a href="securite.php">Sécurité</a></div>
</div>
<div class="Style10" id="Layer38">
<div align="right"><a href="livraison.php">Livraison</a></div>
</div>
<div class="Style10" id="Layer39"><a href="CONDITIONS_GENERALES_DE_VENTE.php">Conditions générales de ventes</a> </div>
<div class="Style10" id="Layer40">
<div align="right"><a href="contact.php">Contactez nous </a></div>
</div>
<div class="Style10" id="Layer41">
<div align="right"><a href="espace_client.php">Mon compte</a> </div>
</div>
<div class="Style10" id="Layer42">
<div align="right"><a href="../ACCOUNT/panier.php">Mon panier </a></div>
</div>
<div class="Style10" id="Layer43">
<div align="right"><a href="ma commande.php">Ma commande </a></div>
</div>
<div class="Style14" id="Layer8">
<div align="left" class="Style12">Pour modifier vos informations personnelles sur orientalartdeco complétez simplement le formulaire ci-joint. </div>
</div>
<p> </p>
<p> </p>
</body>
</html>
<?php
mysql_free_result($Modification);
?> |
Partager