Files

76 lines
2.7 KiB
PHP
Executable File

<?php
session_start();
$idfamille=$HTTP_GET_VARS["idfamille"];
$idcateg=$HTTP_GET_VARS["idcateg"];
$idprod=$HTTP_GET_VARS["idprod"];
?>
<html>
<head>
<title>Partie Administrateur</title>
</head>
<body>
<?php
if (isset($_SESSION['idadm']))
{
?>
<div align="center">
<table border=1>
<tr>
<td colspan=2 align="center">
<h1>Site Marchand Airtria</h1>
</td>
</tr>
<tr>
<td colspan=2 align="center">
<br><br><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");
$requete5 = "select idprod,refprod,denomination,description,location,delailivraison,prixht1,prixht2,prixht3,qteprod1,qteprod2,qteprod3,poidsprod1,poidsprod2,poidsprod3,pathpdfdocument,pathphotobassedef,pathphotohautedef,idfamille from produit where idprod='$idprod'";
$result5=mysql_query($requete5) or die ("Erreur SQL :$requete<br>".mysql_error()."...");
while ($ligne=mysql_fetch_row($result5))
{
$refprod=$ligne[1];
$denomination=$ligne[2];
$description=$ligne[3];
$location=$ligne[4];
$delailivraison=$ligne[5];
$prixht1=$ligne[6];
$prixht2=$ligne[7];
$prixht3=$ligne[8];
$qteprod1=$ligne[9];
$qteprod2=$ligne[10];
$qteprod3=$ligne[11];
$poidsprod1=$ligne[12];
$poidsprod2=$ligne[13];
$poidsprod3=$ligne[14];
$pathpdfdocument=$ligne[15];
$pathphotobassedef=$ligne[16];
$pathphotohautedef=$ligne[17];
$idfamille=$ligne[18];
}
$requete6="insert into produit (denomination,refprod,description,location,delailivraison,prixht1,prixht2,prixht3,qteprod1,qteprod2,qteprod3,poidsprod1,poidsprod2,poidsprod3,pathpdfdocument,pathphotobassedef,pathphotohautedef,idfamille) values ('$denomination','$refprod','$description','$location','$delailivraison','$prixht1','$prixht2','$prixht3','$qteprod1','$qteprod2','$qteprod3','$poidsprod1','$poidsprod2','$poidsprod3','$pathpdfdocument','$pathphotobassedef','$pathphotohautedef','$idfamille')";
$result6=mysql_query($requete6) or die ("Erreur SQL :$requete<br>".mysql_error()."...");
?>
produit duplique
<br><a href="famille.php?loguer=oui&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>