From: Joe Hunt Date: Sun, 22 Mar 2009 14:32:41 +0000 (+0000) Subject: Joe Hun rerun, didn't work (empty file when inserting). Better ratio when showing... X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=b19d7ac51e1e69ac2665bb84af6c259011c53c9d;p=textcart.git Joe Hun rerun, didn't work (empty file when inserting). Better ratio when showing picture. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 62c3020..625b527 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 c841514..ca65111 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 ac9a5f8..d8f8d3b 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 f4c73db..4babe6e 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(); }