! -> Note
$ -> Affected files
-22-Mar-2009 Janusz Dobrowolski
+22-Mar-2009 Janusz Dobrowolski/Joe Hun rerun, didn't work (empty file when inserting)
# Fixed item picture display after upload, fixed item image filenames.
$ /inventory/manage/items.php
/inventory/includes/inventory_db.inc
{
$_POST['stock_id'] = $stock_id = $_GET['stock_id'];
}
-else if (isset($_POST['stock_id']))
+elseif (isset($_POST['stock_id']))
{
$stock_id = $_POST['stock_id'];
}
-
if (list_updated('stock_id')) {
$_POST['NewStockID'] = get_post('stock_id');
clear_data();
$upload_file = "";
if (isset($_FILES['pic']) && $_FILES['pic']['name'] != '')
{
+ $stock_id = $_POST['NewStockID'];
$result = $_FILES['pic']['error'];
$upload_file = 'Yes'; //Assume all is well to start off with
$filename = $comp_path . "/$user_comp/images";
// 31/08/08 - rand() call is necessary here to avoid caching problems. Thanks to Peter D.
$stock_img_link .= "<img id='item_img' alt = '[".$_POST['NewStockID'].".jpg".
"]' src='$comp_path/$user_comp/images/".item_img_name($_POST['NewStockID']).".jpg?nocache=".rand()."'".
- " width='$pic_width' height='$pic_height' border='0'>";
+ " height='$pic_height' border='0'>";
}
else
{
$rep->NewLine();
if ($rep->row - $pic_height < $rep->bottomMargin)
$rep->Header();
- $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, $pic_width, $pic_height);
+ $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, 0, $pic_height);
$rep->row -= $pic_height;
$rep->NewLine();
}
$rep->NewLine();
if ($rep->row - $pic_height < $rep->bottomMargin)
$rep->Header();
- $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, $pic_width, $pic_height);
+ $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, 0, $pic_height);
$rep->row -= $pic_height;
$rep->NewLine();
}