diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index bc5b34ec909..c8f82d5c9a6 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -179,8 +179,7 @@ if ($_POST["action"] == 'update_price' && $product->price = ereg_replace(" ","",$_POST["price"]); - - if ( $product->update_price($product->id, $user) > 0 ) + if ( $product->update_price($product->id, $user) > 0 ) { $_GET["action"] = ''; @@ -411,7 +410,7 @@ else if ($_GET["action"] == 'edit_price' && $user->rights->produit->creer) { print '
Nouveau prix
'; - print "
\n"; + print ''; print ''; print ''; print ''; diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 7f06e5bfba0..0bf5e1dc882 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -71,24 +71,24 @@ if ($_POST["action"] == 'add' && $user->admin) if ($_POST["action"] == 'update' && $user->admin) { - $edituser = new User($db, $id); - $edituser->fetch(); + $edituser = new User($db, $_GET["id"]); + $edituser->fetch(); - $edituser->nom = $_POST["nom"]; - $edituser->note = $_POST["note"]; - $edituser->prenom = $_POST["prenom"]; - $edituser->login = $_POST["login"]; - $edituser->email = $_POST["email"]; - $edituser->admin = $_POST["admin"]; - $edituser->webcal_login = $_POST["webcal_login"]; - - if (! $edituser->update()) + $edituser->nom = $_POST["nom"]; + $edituser->note = $_POST["note"]; + $edituser->prenom = $_POST["prenom"]; + $edituser->login = $_POST["login"]; + $edituser->email = $_POST["email"]; + $edituser->admin = $_POST["admin"]; + $edituser->webcal_login = $_POST["webcal_login"]; + + if (! $edituser->update()) { - print $edituser->error(); + print $edituser->error(); } - if (isset($password) && $password !='' ) + if (isset($password) && $password !='' ) { - $edituser->password($password,$conf->password_encrypted); + $edituser->password($password,$conf->password_encrypted); } } @@ -118,7 +118,7 @@ if ($action == 'create') print_titre('Nouvel utilisateur'); - print ''; + print ''; print ''; print '
'; @@ -390,7 +390,7 @@ else print_fiche_titre("Edition fiche utilisateur",$message); print '
'; - print ''; + print ''; print ''; print '
';