From 73f60eac205e4bcebf71b86258cb292810d584a8 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sun, 22 Mar 2009 14:32:41 +0000 Subject: [PATCH] Joe Hun rerun, didn't work (empty file when inserting). Better ratio when showing picture. --- CHANGELOG.txt | 2 +- inventory/manage/items.php | 6 +++--- reporting/rep104.php | 2 +- reporting/rep303.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 62c30203..625b5275 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,7 +19,7 @@ Legend: ! -> 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 diff --git a/inventory/manage/items.php b/inventory/manage/items.php index c841514c..ca65111d 100644 --- a/inventory/manage/items.php +++ b/inventory/manage/items.php @@ -29,11 +29,10 @@ if (isset($_GET['stock_id'])) { $_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(); @@ -43,6 +42,7 @@ if (list_updated('stock_id')) { $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"; @@ -397,7 +397,7 @@ if (isset($_POST['NewStockID']) && file_exists("$comp_path/$user_comp/images/" // 31/08/08 - rand() call is necessary here to avoid caching problems. Thanks to Peter D. $stock_img_link .= "[".$_POST["; + " height='$pic_height' border='0'>"; } else { diff --git a/reporting/rep104.php b/reporting/rep104.php index ac9a5f8f..d8f8d3bd 100644 --- a/reporting/rep104.php +++ b/reporting/rep104.php @@ -166,7 +166,7 @@ function print_price_listing() $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(); } diff --git a/reporting/rep303.php b/reporting/rep303.php index f4c73db3..4babe6e2 100644 --- a/reporting/rep303.php +++ b/reporting/rep303.php @@ -207,7 +207,7 @@ function print_stock_check() $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(); } -- 2.30.2