case 'f':
                        $value = '<input type="text" name="keep[' . $row['order_id'] . ']" class="w040 tac" value="' . intval($row['order_quantity']) . '" />';
                        break;
                    default:
                        $value = '&nbsp;';
                }
                $cols[$class_raw] = strval($value);
            }
            $table[] = $cols;
        }
    }
    $date_filter_nice = date('d.m.Y', strtotime($date_filter));
    $total_confirmed = $total_orders - $total_cancels;
    //GRAB IMPORT DATA
    $last_import = $class_jd->retrieveLatestDownloads($jng_sp_id, 'IMPORTDATA', 1);
    $importdata = $class_jc->importDataQueryEAN($jng_sp_id, $products_ean);
    $pdata = $class_ean->getProductArticle($products_ean);
    $stock = $class_pm->stockRetrieve($whid, $pdata['products_id'], $pdata['articles_id'], true);
    $content .= "<h2>Order Date {$date_filter_nice} - EAN {$products_ean}</h2>";
    $content .= '<div class="smallText red" style="margin-bottom:5px;">* ' . (count($last_import) > 0 ? 'Using Data from last import: ' . $last_import[0]['info'] : 'No import data can be used') . '</div>';
    $content .= '<div class="draw-table" style="margin-bottom:20px;"><table border="0" cellspacing="0" cellpadding="0">';
    $content .= '<tr><th>Open PO</th><th>Stock SP</th><th>Stock HH</th><th>Ordered<br />by&nbsp;Customers</th><th>Delivered<br />to&nbsp;Customers</th></tr>';
    $content .= "<tr class=\"o\"><td class=\"w080 tac\">{$importdata['sp_open_orders']}</td><td class=\"w080 tac\">{$importdata['sp_stock']}</td><td class=\"w080 tac\">{$stock}</td><td class=\"w080 tac\">{$importdata['sp_ordered']}</td><td class=\"w080 tac\">{$importdata['sp_delivered']}</td></tr>";
    $content .= '</table></div>';
    $content .= "<h3>Total Order = {$total_orders} &sdot; Total Cancels = {$total_cancels} &sdot; Total Confirmed = {$total_confirmed}</h3>";
    $content .= '<form name="cancel_orders" action="?' . $_SERVER['QUERY_STRING'] . '" method="post">';
    $content .= '<input type="hidden" name="me_action" value="CANCELORDERS" />';
    $content .= tep_draw_table('', $table);
    $content .= '<div class="buttons-left"><input type="submit" name="submit" value="Cancel Orders!" title="Click here to cancel orders as " /></div>';
    $content .= '</form>';
} else {