Example #1
0
 //Affichage onglet Categories
 if ($conf->categorie->enabled) {
     $head[$h][0] = DOL_URL_ROOT . "/fourn/product/categorie.php?id=" . $object->id;
     $head[$h][1] = $langs->trans('Categories');
     $h++;
 }
 $head[$h][0] = DOL_URL_ROOT . "/product/fiche.php?id=" . $object->id;
 $head[$h][1] = $langs->trans("CommercialCard");
 $h++;
 dol_fiche_head($head, $hselected, $langs->trans("CardProduct" . $object->type) . ' : ' . $object->ref);
 print $mesg;
 print '<table class="border" width="100%">';
 print "<tr>";
 print '<td>' . $langs->trans("Ref") . '</td><td>' . $object->ref . '</td>';
 print '<td colspan="2">';
 print $object->getLibStatut(2);
 print '</td></tr>';
 print '<tr><td>' . $langs->trans("Label") . '</td><td>' . $object->libelle . '</td>';
 print '<td>' . $langs->trans("SellingPrice") . '</td><td>' . price($object->price) . '</td></tr>';
 print "</table><br>\n";
 /*
  * Ajouter une photo
  *
  */
 if ($action == 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer) && !empty($conf->global->MAIN_UPLOAD_DOC)) {
     print_titre($langs->trans("AddPhoto"));
     print '<form name="userfile" action="photos.php?id=' . $object->id . '" enctype="multipart/form-data" METHOD="POST">';
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     print '<input type="hidden" name="max_file_size" value="' . $conf->maxfilesize . '">';
     print '<table class="border" width="100%"><tr>';
     print '<td>' . $langs->trans("File") . '</td>';
Example #2
0
			$head[$h][1] = $langs->trans('Categories');
			$h++;
		}

		$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
		$head[$h][1] = $langs->trans("CommercialCard");
		$h++;

		dol_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);

		print($mesg);
		print '<table class="border" width="100%">';
		print "<tr>";
		print '<td>'.$langs->trans("Ref").'</td><td>'.$product->ref.'</td>';
		print '<td colspan="2">';
		print $product->getLibStatut(2);
		print '</td></tr>';
		print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>';
		print '<td>'.$langs->trans("SellingPrice").'</td><td>'.price($product->price).'</td></tr>';
		print "</table><br>\n";

		/*
		 * Ajouter une photo
		 *
		 */
		if ($_GET["action"] == 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer) && ! empty($conf->global->MAIN_UPLOAD_DOC))
		{
			print_titre($langs->trans("AddPhoto"));

			print '<form name="userfile" action="photos.php?id='.$product->id.'" enctype="multipart/form-data" METHOD="POST">';
			print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';