1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
<form action="index.php?menu=1&action=add" method="post" NAME="Choix" enctype="multipart/form-data">
<table border="1" class="txt">
<tr>
<td colspan="4" align="center" id="titre">Ajout d'un nouvel article</td>
</tr>
<tr>
<td width="150">Catégorie</td>
<td>
<?php
if ($_SESSION["categorie"] != "")
{
echo '<select name="categorie">';
echo '<option value="">Choisissez la catégorie</option>';
while($result_cat=mysql_fetch_array($result))
{
if ($categorie != $_SESSION["categorie"])
echo "<option value=\"".$result_cat["ID_CAT"]."\"> ". $result_cat["CAT"] ."</option>";
else
echo "<option value=\"".$result_cat["ID_CAT"]."\" selected> ". $result_cat["CAT"] ."</option>";
}
echo '</select>';
echo ' <img src="bt_refresh.png" border="0" width="20" height="20" alt="" align="absmiddle">';
}
else
{
echo '<select name="categorie" onchange="Lien()">';
echo '<option value="">Choisissez la catégorie</option>';
while($result_cat=mysql_fetch_array($result))
{
echo '<option value="index.php?menu=1&id_cat='.$result_cat['ID_CAT'].'"> '. $result_cat['CAT'] .'</option>';
//echo "<option value=\"index.php?menu=1&id_cat=".$result_cat["ID_CAT"]."\"> ". $result_cat["CAT"] ."</option>";
}
}
echo '</select>';
?>
</td>
<?
$maref="SELECT ID_REF,REF FROM SHOP_ARTICLE WHERE ID_CAT='".$id_cat."' ORDER BY ID_ART DESC LIMIT 0,1";
@$resulte = mysql_fetch_array(arom($maref));
?>
<td colspan=2>Référence de l'article:
<input type="text" name="ref" size="8" maxlength="8" readonly value=" <?echo $resulte["REF"]+1;?>">
</td>
</tr>
<!-- <tr>
<td width="150">Libellé Plante</td>
<td colspan="3"><input type="text" name="lib_plante" size="40" maxlength="32"></td>
</tr> -->
<tr>
<td width="150">Libellé Article</td>
<td colspan="3"><input type="text" name="lib_article" size="40" maxlength="32"></td>
</tr>
<tr>
<td width="150">Descriptif</td>
<td colspan="3"><textarea name="descriptif" cols="50" rows="3"></textarea></td>
</tr>
<tr>
<td width="150">Conditionnement</td>
<td><input type="text" name="cond" size="6" maxlength="6"> (ml/gr/unité/...)</td>
<td width="150">Poids en grammes</td>
<td><input type="text" name="poids" size="5" maxlength="5"> gr</td>
</tr>
<!--
<tr>
<td width="150">Type</td>
<td><input type="radio" name="type" value="actuel" checked>Actuel
<input type="radio" name="type" value="nouveaute">New
<input type="radio" name="type" value="promotion">Promo
</td>
<td width="150">Date d'expiration<br>Format: YYYY-MM-JJ</td>
<td><input type="text" name="date_expiration" size="10" maxlength="10"></td>
</tr>
-->
<tr>
<td width="150"><!-- Image Plante --></td>
<td colspan="3">
<!-- <input type="file" name="plante" size="30"> image 400x300 maximum 500Ko -->
</td>
</tr>
<tr>
<td width="150">Image Article</td>
<td colspan="3"><input type="file" name="article" size="30"> image 400x300 maximum 350Ko
</td>
</tr>
<tr>
<td width="150">Activation</td>
<td colspan="3">
<input type="radio" name="activation" value="desactiver"> Désactiver l'article dans la base
<input type="radio" name="activation" value="activer" checked> Activer l'article dans la base
</td>
</tr>
<tr>
<td width="150">Prix Unitaire:</td>
<td><input type="text" name="pu" size="7" maxlength="7"> </td>
<td colspan="2" align="center"><input type="submit" id="bt" value="<< Enregistrer l'article >>"></td>
</tr>
</table>
</form> |