183 lines
6.7 KiB
PHP
Executable File
183 lines
6.7 KiB
PHP
Executable File
<?php
|
|
session_start();
|
|
$loguer=$HTTP_POST_VARS["loguer"];
|
|
$idfamille=$HTTP_POST_VARS["idfamille"];
|
|
$idcateg=$HTTP_POST_VARS["idcateg"];
|
|
$idprod=$HTTP_POST_VARS["idprod"];
|
|
$refprod=$HTTP_POST_VARS["refprod"];
|
|
$denomination=$HTTP_POST_VARS["denomination"];
|
|
$description=$HTTP_POST_VARS["description"];
|
|
$location=$HTTP_POST_VARS["location"];
|
|
$delailivraison=$HTTP_POST_VARS["delailivraison"];
|
|
$prixht1=$HTTP_POST_VARS["prixht1"];
|
|
$prixht2=$HTTP_POST_VARS["prixht2"];
|
|
$prixht3=$HTTP_POST_VARS["prixht3"];
|
|
$qteprod1=$HTTP_POST_VARS["qteprod1"];
|
|
$qteprod2=$HTTP_POST_VARS["qteprod2"];
|
|
$qteprod3=$HTTP_POST_VARS["qteprod3"];
|
|
$poidsprod1=$HTTP_POST_VARS["poidsprod1"];
|
|
$poidsprod2=$HTTP_POST_VARS["poidsprod2"];
|
|
$poidsprod3=$HTTP_POST_VARS["poidsprod3"];
|
|
$pathpdfdocument=$HTTP_POST_VARS["pathpdfdocument"];
|
|
$pathphotobassedef=$HTTP_POST_VARS["pathphotobassedef"];
|
|
$pathphotohautedef=$HTTP_POST_VARS["pathphotohautedef"];
|
|
$coef=$HTTP_POST_VARS["coef"];
|
|
$colisage=$HTTP_POST_VARS["colisage"];
|
|
?>
|
|
<html>
|
|
<head>
|
|
<title>Partie Administrateur</title>
|
|
</head>
|
|
<body>
|
|
<?php
|
|
print "coef : $coef";
|
|
if (isset($_SESSION['idadm']))
|
|
{
|
|
?>
|
|
<div align="center">
|
|
<table border=0>
|
|
<tr>
|
|
<td colspan=2 align="center">
|
|
<h1>Gestion des produits</h1>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<?php
|
|
require("../connexion.php");
|
|
$conn = mysql_connect($host, $user, $password);
|
|
mysql_select_db($bdd) or die("Impossible d'ouvrir la base de donnee $bdd");
|
|
|
|
if ($loguer)
|
|
{
|
|
|
|
$requete="update produit set
|
|
denomination ='$denomination',
|
|
refprod='$refprod',
|
|
description='$description',
|
|
location='$location',
|
|
delailivraison='$delailivraison',
|
|
prixht1='$prixht1',
|
|
prixht2='$prixht2',
|
|
prixht3='$prixht3',
|
|
qteprod1='$qteprod1',
|
|
qteprod2='$qteprod2',
|
|
qteprod3='$qteprod3',
|
|
poidsprod1='$poidsprod1',
|
|
poidsprod2='$poidsprod2',
|
|
poidsprod3='$poidsprod3',
|
|
pathpdfdocument='$pathpdfdocument',
|
|
pathphotobassedef='$pathphotobassedef',
|
|
pathphotohautedef='$pathphotohautedef',
|
|
idfamille='$idfamille',
|
|
coef='$coef'
|
|
where
|
|
idprod='$idprod'";
|
|
|
|
$result=mysql_query($requete) or die ("Erreur SQL :$requete<br>".mysql_error()."...");
|
|
|
|
?>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
idprod
|
|
</td>
|
|
<td>
|
|
<?php print $idprod ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
refprod
|
|
</td>
|
|
<td>
|
|
<?php print $refprod ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Denomination
|
|
</td>
|
|
<td>
|
|
<?php print $denomination ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Description
|
|
</td>
|
|
<td>
|
|
<?php print $description ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Location
|
|
</td>
|
|
<td>
|
|
<?php print $location ?>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Delailivraison
|
|
</td>
|
|
<td>
|
|
<?php print $delailivraison ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
pathpdfdocument
|
|
</td>
|
|
<td>
|
|
<?php print $pathpdfdocument ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
pathphotobassedef
|
|
</td>
|
|
<td>
|
|
<?php print $pathphotobassedef ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
pathphotohautedef
|
|
</td>
|
|
<td>
|
|
<?php print $pathphotohautedef ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
idfamille
|
|
</td>
|
|
<td>
|
|
<?php print $idfamille?>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<?php
|
|
} else {
|
|
?>
|
|
<tr><td colspan=4><a href="login.php">Une erreure s'est produite veuillez vous reconnecter</a></td></tr>
|
|
<?php
|
|
session_destroy("loguer");
|
|
}
|
|
?>
|
|
<br><a href="detprod.php?idprod=<?php print $idprod?>&loguer=oui&idfamille=<?php print $idfamille?>&idcateg=<?php print $idcateg ?>&<?php print session_name();?>=<?php print session_id();?>">Modifier de nouveau</a>
|
|
<br><a href="famille.php?idprod=<?php print $idprod?>&idfamille=<?php print $idfamille?>&idcateg=<?php print $idcateg ?>&<?php print session_name();?>=<?php print session_id();?>">Retour</a>
|
|
</div>
|
|
<?php
|
|
}
|
|
else
|
|
{
|
|
print "Erreur de connection";
|
|
}
|
|
?>
|
|
</body>
|
|
</html>
|
|
|