69 lines
2.6 KiB
PHP
Executable File
69 lines
2.6 KiB
PHP
Executable File
<?php
|
|
session_start();
|
|
$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"];
|
|
$prixht=$HTTP_POST_VARS["prixht"];
|
|
$pathpdfdocument=$HTTP_POST_VARS["pathpdfdocument"];
|
|
$pathphotobassedef=$HTTP_POST_VARS["pathphotobassedef"];
|
|
$pathphotohautedef=$HTTP_POST_VARS["pathphotohautedef"];
|
|
$prixht1=$HTTP_POST_VARS["priht1"];
|
|
$prixht2=$HTTP_POST_VARS["priht2"];
|
|
$prixht3=$HTTP_POST_VARS["priht3"];
|
|
$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"];
|
|
?>
|
|
<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");
|
|
|
|
$requete="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')";
|
|
|
|
$result=mysql_query($requete) or die ("Erreur SQL :$requete<br>".mysql_error()."...");
|
|
|
|
?>
|
|
<br>Produit <?php print $denomination?> Ajoute<br>
|
|
<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();?>">Retour</a>
|
|
</div>
|
|
<?php
|
|
}
|
|
else
|
|
{
|
|
print "Erreur de connection";
|
|
}
|
|
?>
|
|
</body>
|
|
</html>
|