-div_start('orders_tbl');
-start_table("$table_style colspan=7 width=80%");
-
-if (isset($_POST['StockLocation']) && $_POST['StockLocation'] == $all_items)
- $th = array(_("#"), _("Reference"), _("Supplier"), _("Location"),
- _("Supplier's Reference"), _("Order Date"), _("Currency"), _("Order Total"),"","","");
-else
- $th = array(_("#"), _("Reference"), _("Supplier"),
- _("Supplier's Reference"), _("Order Date"), _("Currency"), _("Order Total"),"","","");
-
-table_header($th);
-
-$j = 1;
-$k = 0; //row colour counter
-$overdue_items = false;
-while ($myrow = db_fetch($result))
-{
-
- if ($myrow["OverDue"] == 1)
- {
- start_row("class='overduebg'");
- $overdue_items = true;
- }
- else
- {
- alt_table_row_color($k);
- }
+$table =& new_db_pager('orders_tbl', $sql, $cols);
+$table->set_marker('check_overdue', _("Marked orders have overdue items."));