Modif register_global
This commit is contained in:
parent
26f13060e4
commit
2c771e236a
@ -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 '<div class="titre">Nouveau prix</div>';
|
||||
print "<form action=\"fiche.php\" method=\"post\">\n";
|
||||
print '<form action="fiche.php?id='.$product->id.'" method="post">';
|
||||
print '<input type="hidden" name="action" value="update_price">';
|
||||
print '<input type="hidden" name="id" value="'.$product->id.'">';
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
@ -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 '<form action="'.$PHP_SELF.'" method="post">';
|
||||
print '<form action="fiche.php" method="post">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
print '<table class="border" width="100%" cellpadding="3" cellspacing="0">';
|
||||
@ -390,7 +390,7 @@ else
|
||||
print_fiche_titre("Edition fiche utilisateur",$message);
|
||||
print '<br>';
|
||||
|
||||
print '<form action="'.$PHP_SELF.'?id='.$id.'" method="post">';
|
||||
print '<form action="fiche.php?id='.$fuser->id.'" method="post">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<table class="border" border="1" cellpadding="3" cellspacing="0">';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user