Jeg har prøvet at ændrer lidt på den med page-break-after men den vil ikke rigtigt:
<?php
require('includes/application_top.php');
// the following cPath references come from application_top.php
$category_depth = 'top';
if (isset($cPath) && tep_not_null($cPath)) {
$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
$cateqories_products = tep_db_fetch_array($categories_products_query);
if ($cateqories_products['total'] > 0) {
$category_depth = 'products'; // display products
} else {
$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
$category_parent = tep_db_fetch_array($category_parent_query);
if ($category_parent['total'] > 0) {
$category_depth = 'nested'; // navigate through the categories
} else {
$category_depth = 'products'; // category has no products, but display the 'no products' message
}
}
}
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRICELIST);
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRICELIST));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<style type="text/css">
<!--
td.priceListWidth{
width:<?php echo WIDTH_PRICE_LIST; ?>px;
}
td.priceListIndent {
background-color:<?php echo INDENT_PRICE_LIST_COLOR; ?>;
width:<?php echo INDENT_PRICE_LIST; ?>;
}
--></style>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php // require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<?php // print function and edit remove by willross
if ($print=="yes"){?>
<!-- column_left disabled for print //-->
<?php } else {?>
<!-- left_navigation //-->
<?php //require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<?php }?>
<!-- body_text //-->
<td width="90%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"> <table border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="100" class="priceListingOverskrift"><?php echo "Prisliste" ?> (<?php echo date(j.". ".F.". ".Y); ?>) <img src="
http://www.primafoder.dk/shop/mediafiles/images/logo.png" align="right">
</td>
</tr>
<tr>
<td>
<br><br>
<div class="page">Page 1 Here</div>
<table border="1" width="100%">
<tr>
<td class="priceListingHeader" width="100">Navn:<br><br></td>
<td class="priceListingHeader" width="100"> _____________________________________________</td>
<td rowspan="7"class="priceListingLille">
<b>Primafoder</b><br>
Lemvigvej 30<br>
7620 Lemvig<br><br>
<b>Klaus Telefon:</b><br>
97 83 61 21<br>
31 22 61 21<br><br>
<b>Viggo Telefon:</b><br>
97 83 62 67<br>
23 42 87 82<br><br>
<b>Kontonummer</b><br>
7608 1140 741
</td>
</tr>
<tr>
<td class="priceListingHeader" width="100">Adresse:<br><br></td>
<td class="priceListingHeader" width="100"> _____________________________________________</td>
</tr>
<tr>
<td class="priceListingHeader" width="100">Postnummer:<br><br></td>
<td class="priceListingHeader" width="100"> _____________________________________________</td>
</tr>
<tr>
<td class="priceListingHeader" width="100">By:<br><br></td>
<td class="priceListingHeader" width="100"> _____________________________________________</td>
</tr>
<tr>
<td class="priceListingHeader" width="100">Telefon:<br><br></td>
<td class="priceListingHeader" width="100"> _____________________________________________</td>
</tr>
<tr>
<td class="priceListingHeader" width="100">Email:<br><br></td>
<td class="priceListingHeader" width="100"> _____________________________________________</td>
</tr>
<tr>
<td class="priceListingHeader" width="100">Password:<br><br><br></td>
<td class="priceListingHeader" width="100"> _____________________________________________<br><br></td>
</tr>
</table>
<?
// groups have products?
function check_products($id_group){
$products_price_query = tep_db_query("select products_to_categories.products_id FROM products_to_categories where products_to_categories.categories_id = ".$id_group." LIMIT 0,1");
if($products_price = tep_db_fetch_array($products_price_query)){
return true;
}
return false;
}
// list products determined group
function get_products($id_group){
global $currencies;
$query = "";
if(!SHOW_MARKED_OUT_STOCK){
$query = " and products.products_status = 1";
}
$products_price_query = tep_db_query("select products_description.products_name, products.products_quantity, products.products_price, products.products_model, products_to_categories.products_id, products_to_categories.categories_id FROM products, products_description, products_to_categories where products_description.language_id = '".idJazyk($_SESSION["language"])."' and products.products_id = products_description.products_id and products.products_quantity <> 100000".$query." and products.products_id = products_to_categories.products_id and products_to_categories.categories_id = ".$id_group." order by products.products_model");
$x=0;
while ($products_price = tep_db_fetch_array($products_price_query)){
$cell = tep_get_products_special_price($products_price['products_id']);
if($cell == 0)
$cell = $products_price['products_price'];
if($x==1) {
$col = "#F8F8F9";
$x = 0;
}else{
$col = "#FFFFFF";
$x++;
}
$quantity = "";
$model = "";
if(SHOW_QUANTITY)
$quantity = "";
if(SHOW_MODEL)
$model = "<td align=\"LEFT\" class=\"priceListing\">".$products_price['products_model']."</td>";
$newString = str_replace(".",",",$products_price);
print "<tr bgcolor=\"".$col."\"><td class=\"priceListing\">
<table align=\"LEFT\" cellpadding=\"0\" cellspacing=\"0\" >
<tr>
<td></td>
<td></td>
</tr>
</table>
</td>".$model."
<td class=\"priceListing\">".$products_price['products_name']."</td>
<td align=\"right\" class=\"priceListingLillePris\"> " . $newString['products_price']."
<td class=\"priceListing\"></td>
<td class=\"priceListing\">X</td>
<td class=\"priceListing\">=</td>
<td class=\"priceListing\"></td>
</tr>";
}
}
// get all groups
function get_group($id_parent,$position){
$qty_text = "";
if(SHOW_QUANTITY) {
$qty_text = "".QUANTITY_TEXT."";
}else{
$qty_text = "";
}
$groups_price_query = tep_db_query("select categories.categories_id, categories_description.categories_name from categories, categories_description where categories.categories_id = categories_description.categories_id and categories.parent_id = ".$id_parent." and categories_description.language_id = '".idJazyk($_SESSION["language"])."' order by categories_description.categories_name");
while ($groups_price = tep_db_fetch_array($groups_price_query)){
$str = "";
for($i = 0; $i < $position; $i++){
$str = $str . "<table align=\"LEFT\" cellpadding=\"5\" cellspacing=\"0\" ><tr><td class=\"priceListIndent\" ></td><td class=\"priceListingHeader\" > </td></tr></table>";
}
$class = "priceListingHeader";
if($position == 0) {
$class = "headerNavigation";
print "<tr><td colspan=\"5\" class=\"priceListWidth\"><div class='page'>Page 1 Here<br><br><table align=\"right\" cellpadding=\"0\" cellspacing=\"0\" ><tr><td class=\"priceListing\">".$qty_text."</td></div></tr></table></td></tr>"; // dónnr? nndîer
}
if(check_products($groups_price['categories_id']) || $position == 0){
print "<tr><td colspan=\"5\" class=\"priceListingOverskrift\">" . $groups_price['categories_name'] . "<strong><font color=\"#000000\"></font></strong></td></tr>
<tr>
<td></td>
<td width='90' class=\"priceListingHeader\">Nummer<br><br></td>
<td width='250' class=\"priceListingHeader\">Varenavn<br><br></td>
<td width='50' class=\"priceListingHeader\" align='right'>Pris<br><br></td>
<td width='100' class=\"priceListingHeaderCenter\" align='right'>Antal<br><br></td>
<td width='100' class=\"priceListingHeaderCenter\" align='right'>Pris inkl. moms<br><br></td>
<td width='100' class=\"priceListingHeaderCenter\" align='right'>Subtotal<br><br></td>
</tr>";
get_products($groups_price['categories_id']);
}
get_group($groups_price['categories_id'],$position+1); // nëläótur? adóddr
}
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?
get_group(0,0);
function idJazyk($dir) {
$najdi = tep_db_query("select languages_id from languages where directory='".$dir."' or name='".$dir."' or code='".$dir."'");
$nalezeno = tep_db_fetch_array($najdi);
return $nalezeno["languages_id"];
}
?>
<tr>
<?php // print function and edit remove by willross
if ($print=="yes"){?>
<!-- column_right disabled for print //-->
<?php } else {?>
<td colspan="5"><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td align="right"><?php //echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
</table></td>
<!-- body_text //-->
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php // require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
</tr>
</table></table>
<!-- body_eof //-->
<!-- footer //-->
<?php // require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<?php }?>
<br>
</body>
</html>
<?php //require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>