table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"'; if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters; $tableBox_string .= '>' . "\n"; for ($i=0, $n=sizeof($contents); $i<$n; $i++) { if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n"; if ($i == '0') { $tableBox_string .= ' table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters; $tableBox_string .= '>' . "\n"; } else { $tableBox_string .= ' '; } if (isset($contents[$i][0]) && is_array($contents[$i][0])) { for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) { if ($i != '0') { if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) { $tableBox_string .= ' table_data_parameters)) { // $tableBox_string .= ' ' . $this->table_data_parameters; // } $tableBox_string .= '>'; if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form']; $tableBox_string .= $contents[$i][$x]['text']; if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= ''; $tableBox_string .= '' . "\n"; } } } } else { if ($i != '0') { $tableBox_string .= ' ' . $contents[$i]['text'] . '' . "\n"; } else { $tableBox_string .= ' table_data_parameters)) { $tableBox_string .= ' ' . $this->table_data_parameters; } $tableBox_string .= '>' . $contents[$i]['text'] . '' . "\n"; } } $tableBox_string .= ' ' . "\n"; if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '' . "\n"; } $tableBox_string .= '' . "\n"; if ($direct_output == true) echo $tableBox_string; return $tableBox_string; } } class productListingBox extends tableBox { function productListingBox($contents) { // $this->table_parameters = 'class="productListing"'; $this->tableBox($contents, true); } } class splitPageResults2 { var $sql_query, $number_of_rows, $current_page_number, $number_of_pages, $number_of_rows_per_page, $page_name; /* class constructor */ function splitPageResults2($query, $max_rows, $count_key = '*', $page_holder = 'page') { global $_GET, $HTTP_POST_VARS; $this->sql_query = $query; $this->page_name = $page_holder; if (isset($_GET[$page_holder])) { $page = $_GET[$page_holder]; } elseif (isset($HTTP_POST_VARS[$page_holder])) { $page = $HTTP_POST_VARS[$page_holder]; } else { $page = ''; } if (empty($page) || !is_numeric($page)) $page = 1; $this->current_page_number = $page; $this->number_of_rows_per_page = $max_rows; $pos_to = strlen($this->sql_query); $pos_from = strpos($this->sql_query, ' from', 0); $pos_group_by = strpos($this->sql_query, ' group by', $pos_from); if (($pos_group_by < $pos_to) && ($pos_group_by != false)) $pos_to = $pos_group_by; $pos_having = strpos($this->sql_query, ' having', $pos_from); if (($pos_having < $pos_to) && ($pos_having != false)) $pos_to = $pos_having; $pos_order_by = strpos($this->sql_query, ' order by', $pos_from); if (($pos_order_by < $pos_to) && ($pos_order_by != false)) $pos_to = $pos_order_by; if (strpos($this->sql_query, 'distinct') || strpos($this->sql_query, 'group by')) { $count_string = 'distinct ' . tep_db_input($count_key); } else { $count_string = tep_db_input($count_key); } $count_query = tep_db_query("select count(" . $count_string . ") as total " . substr($this->sql_query, $pos_from, ($pos_to - $pos_from))); $count = tep_db_fetch_array($count_query); $this->number_of_rows = $count['total']; $this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page); if ($this->current_page_number > $this->number_of_pages) { $this->current_page_number = $this->number_of_pages; } $offset = ($this->number_of_rows_per_page * ($this->current_page_number - 1)); $this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page; } // display split-page-number-links function display_links2($max_page_links, $parameters = '') { global $PHP_SELF, $request_type; $request_type='NONSSL'; $display_links_string = ''; $class = 'class="pageResults"'; if (tep_not_null($parameters) && (substr($parameters, -1) != '&')) $parameters .= '&'; // previous button - not displayed on first page if ($this->current_page_number > 1) $display_links_string .= '' . PREVNEXT_BUTTON_PREV . '  '; // check if number_of_pages > $max_page_links $cur_window_num = intval($this->current_page_number / $max_page_links); if ($this->current_page_number % $max_page_links) $cur_window_num++; $max_window_num = intval($this->number_of_pages / $max_page_links); if ($this->number_of_pages % $max_page_links) $max_window_num++; // previous window of pages if ($cur_window_num > 1) $display_links_string .= '...'; // page nn button for ($jump_to_page = 1 + (($cur_window_num - 1) * $max_page_links); ($jump_to_page <= ($cur_window_num * $max_page_links)) && ($jump_to_page <= $this->number_of_pages); $jump_to_page++) { if ($jump_to_page == $this->current_page_number) { $display_links_string .= ' ' . $jump_to_page . ' '; } else { $display_links_string .= ' ' . $jump_to_page . ' '; } } // next window of pages if ($cur_window_num < $max_window_num) $display_links_string .= '... '; // next button if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= ' ' . PREVNEXT_BUTTON_NEXT . ' '; return $display_links_string; } function display_count2($text_output) { $to_num = ($this->number_of_rows_per_page * $this->current_page_number); if ($to_num > $this->number_of_rows) $to_num = $this->number_of_rows; $from_num = ($this->number_of_rows_per_page * ($this->current_page_number - 1)); if ($to_num == 0) { $from_num = 0; } else { $from_num++; } return sprintf($text_output, $from_num, $to_num, $this->number_of_rows); } } // Return table heading with sorting capabilities function tep_create_sort_heading($sortby, $colnum, $heading) { global $PHP_SELF; $sort_prefix = ''; $sort_suffix = ''; if ($sortby) { $sort_prefix = '' ; $sort_suffix = (substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? '+' : '-') : '') . ''; } return $sort_prefix . $heading . $sort_suffix; } if ((isset($_GET['action'])) && ($_GET['action'] == 'export')) { if (isset($_GET['manufacturers_id']) && ($_GET['manufacturers_id'] != '') && (!isset($_GET['filter_id']))) { $manufacturer_query = tep_db_query("select manufacturers_name as name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $_GET['manufacturers_id'] . "'"); $manufacturer = tep_db_query($manufacturer_query); $xls_header = 'Margin Report: ' . $manufacturer['name']; } elseif (isset($_GET['manufacturers_id']) && ($_GET['manufacturers_id'] != '') && (isset($_GET['filter_id']) && ($_GET['filter_id'] != ''))) { $manufacturer_query = tep_db_query("select manufacturers_name as name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $_GET['manufacturers_id'] . "'"); $manufacturer = tep_db_fetch_array($manufacturer_query); $category_query = tep_db_query("select categories_name as name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $_GET['filter_id'] . "'"); $category = tep_db_fetch_array($category_query); $xls_header = 'Margin Report: ' . $manufacturer['name'] . ' - ' . $category['name']; } else { $xls_header = 'Margin Report: All Products'; } $sql = stripslashes($_GET['sql']); //echo $sql; $csv_query = mysql_query($sql); $xls .= ''; $a = '1'; while ($csv_results = tep_db_fetch_array($csv_query)) { if ($a == '1') { if ($csv_results['specials_price'] == '' || $csv_results['specials_price'] == 'NULL') { $xls .= ''; } else { $xls .= ''; } $a='0'; } else { if ($csv_results['specials_price'] == '' || $csv_results['specials_price'] == 'NULL') { $xls .= ''; } else { $xls .= ''; } $a='1'; } } $xls .= '
' . $xls_header. '
'. TEXT_PRODUCTS_NAME .' '. TEXT_PRODUCTS_COST .' '. TEXT_PRODUCTS_PRICE .' '. TEXT_SPECIAL_PRICE .' '. TEXT_MARGIN_MONEY .' '. TEXT_MARGIN_PERCENTAGE .'
' . tep_get_products_name($csv_results['products_id']) . '' .$currencies->format($csv_results['products_cost']) . '' . $currencies->format($csv_results['products_price']) . ' ' . $currencies->format($csv_results['margin_dollars']) . '' . number_format($csv_results['margin_percentage'], '2', '.', ',') . '
' . tep_get_products_name($csv_results['products_id']) . '' .$currencies->format($csv_results['products_cost']) . '' . $currencies->format($csv_results['products_price']) . '' . $currencies->format($csv_results['specials_price']) . '' . $currencies->format($csv_results['margin_dollars']) . '' . number_format($csv_results['margin_percentage'], '2', '.', ',') . '
' . tep_get_products_name($csv_results['products_id']) . '' .$currencies->format($csv_results['products_cost']) . '' . $currencies->format($csv_results['products_price']) . ' ' . $currencies->format($csv_results['margin_dollars']) . '' . number_format($csv_results['margin_percentage'], '2', '.', ',') . '
' . tep_get_products_name($csv_results['products_id']) . '' .$currencies->format($csv_results['products_cost']) . '' . $currencies->format($csv_results['products_price']) . '' . $currencies->format($csv_results['specials_price']) . '' . $currencies->format($csv_results['margin_dollars']) . '' . number_format($csv_results['margin_percentage'], '2', '.', ',') . '
This report was generated by Margin Report. An Eclyptiq contribution for osCommerce ms2.2.
'; ///////////////////////////////////////////////////////////////////////////////// if ((isset($_GET['file'])) && ($_GET['file'] != '') && ($_GET['file'] != 'example_filename')) { ////////////////////////////////////////////////////////////// // Please change this to the folder you want to use. $extension = '.xls'; ////////////////////////////////////////////////////////////// $filename = $_GET['file'] . $extension; header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=" . $filename); header("Pragma: no-cache"); header("Expires: 0"); print "$xls"; exit(); } else { echo 'Please enter a valid filename and check your location.'; } } ////////////////////////////////////////////////////////////////////////////////// ?> > <?php echo TITLE; ?>
1) { echo ' ' . "\n"; } ?>
' . tep_draw_form('filter', FILENAME_MARGIN_REPORT, '', 'get') . TEXT_SHOW . ' '; if (isset($_GET['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $_GET['manufacturers_id']); $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES_BY_MANUFACTURER)); } else { echo tep_draw_hidden_field('cPath', $cPath); $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); } echo tep_draw_hidden_field('sort', $_GET['sort']); while ($filterlist = tep_db_fetch_array($filterlist_query)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); } if (!isset($_GET['manufacturers_id'])) echo tep_draw_pull_down_menu('manufacturers_id', $options, (isset($_GET['filter_id']) ? $_GET['filter_id'] : ''), 'onchange="this.form.submit()"'); if (isset($_GET['manufacturers_id'])) echo tep_draw_pull_down_menu('filter_id', $options, (isset($_GET['filter_id']) ? $_GET['filter_id'] : ''), 'onchange="this.form.submit()"'); echo '
'1', 'PRODUCT_LIST_COST' => '2', 'PRODUCT_LIST_PRICE' => '3', 'PRODUCT_LIST_SPECIAL_PRICE' => '4', 'PRODUCT_LIST_MARGIN_DOLLARS' => '5', 'PRODUCT_LIST_MARGIN_PERCENTAGE' => '6'); asort($define_list); $column_list = array(); reset($define_list); while (list($key, $value) = each($define_list)) { if ($value > 0) $column_list[] = $key; } // show the products of a specified manufacturer if (isset($_GET['manufacturers_id'])) { if (isset($_GET['filter_id']) && tep_not_null($_GET['filter_id'])) { // We are asked to show only a specific category $listing_sql = "select p.products_id, p.products_price as products_price, p.products_cost, pd.products_name, IF(s.status, s.specials_new_products_price, NULL) as specials_price, if(s.status, s.specials_new_products_price-p.products_cost, p.products_price-p.products_cost) as margin_dollars, if(s.status, (s.specials_new_products_price-p.products_cost)/s.specials_new_products_price*100, (p.products_price-p.products_cost)/p.products_price*100) as margin_percentage, p2c.categories_id as category, c.parent_id as parent from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and p2c.products_id = p.products_id and c.categories_id = p2c.categories_id and p2c.categories_id = '" . (int)$_GET['filter_id'] . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'"; } else { // We show them all $listing_sql = "select p.products_id, p.products_price as products_price, p.products_cost, pd.products_name, IF(s.status, s.specials_new_products_price, NULL) as specials_price, if(s.status, s.specials_new_products_price-p.products_cost, p.products_price-p.products_cost) as margin_dollars, if(s.status, (s.specials_new_products_price-p.products_cost)/s.specials_new_products_price*100, (p.products_price-p.products_cost)/p.products_price*100) as margin_percentage, p2c.categories_id as category, c.parent_id as parent from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and p2c.products_id = p.products_id and c.categories_id = p2c.categories_id and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'"; } } elseif (isset($_GET['filter_id']) && tep_not_null($_GET['filter_id'])) { // show the products in a given category // We are asked to show only specific category $listing_sql = "select p.products_id, p.products_price as products_price, p.products_cost, pd.products_name, IF(s.status, s.specials_new_products_price, NULL) as specials_price, if(s.status, s.specials_new_products_price-p.products_cost, p.products_price-p.products_cost) as margin_dollars, if(s.status, (s.specials_new_products_price-p.products_cost)/s.specials_new_products_price*100, (p.products_price-p.products_cost)/p.products_price*100) as margin_percentage, p2c.categories_id as category, c.parent_id as parent from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and p2c.products_id = p.products_id and c.categories_id = p2c.categories_id and p2c.categories_id = '" . (int)$_GET['filter_id'] . "'"; } elseif (isset($_GET['report_id']) && tep_not_null($_GET['report_id'])) { // Show the products from the time frame defined by the report variable. $listing_sql = "select p.products_id, p.products_price as products_price, p.products_cost, pd.products_name, IF(s.status, s.specials_new_products_price, NULL) as specials_price, if(s.status, s.specials_new_products_price-p.products_cost, p.products_price-p.products_cost) as margin_dollars, if(s.status, (s.specials_new_products_price-p.products_cost)/s.specials_new_products_price*100, (p.products_price-p.products_cost)/p.products_price*100) as margin_percentage, p2c.categories_id as category, c.parent_id as parent from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and p2c.products_id = p.products_id and c.categories_id = p2c.categories_id and p2c.categories_id = '" . (int)$_GET['filter_id'] . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.products_price as products_price, p.products_cost, pd.products_name, IF(s.status, s.specials_new_products_price, NULL) as specials_price, if(s.status, s.specials_new_products_price-p.products_cost, p.products_price-p.products_cost) as margin_dollars, if(s.status, (s.specials_new_products_price-p.products_cost)/s.specials_new_products_price*100, (p.products_price-p.products_cost)/p.products_price*100) as margin_percentage, p2c.categories_id as category, c.parent_id as parent from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and p2c.products_id = p.products_id and c.categories_id = p2c.categories_id"; } if ( (!isset($_GET['sort'])) || (!ereg('[1-8][ad]', $_GET['sort'])) || (substr($_GET['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_PRODUCT') { $_GET['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; } } } else { $sort_col = substr($_GET['sort'], 0 , 1); $sort_order = substr($_GET['sort'], 1); $listing_sql .= ' order by '; switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_PRODUCT': $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_COST': $listing_sql .= "p.products_cost " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_PRICE': $listing_sql .= "p.products_price " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_SPECIAL_PRICE': $listing_sql .= "specials_price " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_MARGIN_DOLLARS': $listing_sql .= "margin_dollars " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_MARGIN_PERCENTAGE': $listing_sql .= "margin_percentage " . ($sort_order == 'd' ? 'desc' : ''); break; } } $listing_split = new splitPageResults2($listing_sql, MAX_DISPLAY_SEARCH_RESULTS); if (($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?>
display_count2(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?> display_links2(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('info', 'x', 'y'))); ?>
$lc_align, 'params' => 'class="dataTableHeadingRow"', 'text' => ' ' . $lc_text . ' '); } if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query); while ($listing = tep_db_fetch_array($listing_query)) { $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="dataTableContent"'); } else { $list_box_contents[] = array('params' => 'class="dataTableContent"'); } $cur_row = sizeof($list_box_contents) - 1; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_PRODUCT': $lc_align = ''; if ($listing['parent'] == '0') { $lc_text = ' ' . $listing['products_name'] . ' '; } else { $lc_text = ' ' . $listing['products_name'] . ' '; } break; case 'PRODUCT_LIST_COST': $lc_align = ''; $lc_text = ' ' . $currencies->format($listing['products_cost']) . ' '; break; case 'PRODUCT_LIST_PRICE': $lc_align = ''; if (tep_not_null($listing['specials_price'])) { $lc_text = ' ' . $currencies->format($listing['products_price']) . ' '; } else { $lc_text = ' ' . $currencies->format($listing['products_price']) . ' '; } break; case 'PRODUCT_LIST_SPECIAL_PRICE': $lc_align = 'right'; if (tep_not_null($listing['specials_price'])) { $lc_text = ' ' . '' . $currencies->format($listing['specials_price']) . ' '; } else { $lc_text = ' ' . ' ' . ' '; } break; case 'PRODUCT_LIST_MARGIN_DOLLARS': $lc_align = 'right'; if ($listing['products_price'] > $listing['products_cost']) { $lc_text = ' ' . $currencies->format($listing['margin_dollars']) . ' '; } else { $lc_text = ' ' . '' . $currencies->format($listing['margin_dollars']) . '' . ' '; } break; case 'PRODUCT_LIST_MARGIN_PERCENTAGE': $lc_align = 'right'; if ($listing['products_price'] > $listing['products_cost']) { $lc_text = ' ' . number_format($listing['margin_percentage'], '2', '.', ',') . '%' . ' '; } else { $lc_text = ' ' . '' . number_format($listing['margin_percentage'], '2', '.', ',') . '%' . ' '; } break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="dataTableRow"', 'text' => $lc_text); } } new productListingBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); new productListingBox($list_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?>
display_count2(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?> display_links2(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('info', 'x', 'y'))); ?>
' . tep_draw_form('report', FILENAME_MARGIN_REPORT2, '', 'get') . TEXT_SHOW . ' '; $options = array(); $options[] = array('id' => 'all', 'text' => TEXT_SELECT_REPORT); $options[] = array('id' => 'daily', 'text' => TEXT_SELECT_REPORT_DAILY); $options[] = array('id' => 'weekly', 'text' => TEXT_SELECT_REPORT_WEEKLY); $options[] = array('id' => 'monthly', 'text' => TEXT_SELECT_REPORT_MONTHLY); $options[] = array('id' => 'quarterly', 'text' => TEXT_SELECT_REPORT_QUARTERLY); $options[] = array('id' => 'semiannually', 'text' => TEXT_SELECT_REPORT_SEMIANNUALLY); $options[] = array('id' => 'annually', 'text' => TEXT_SELECT_REPORT_ANNUALLY); echo tep_draw_pull_down_menu('report_id', $options, (isset($_GET['report_id']) ? $_GET['report_id'] : '1'), 'onchange="this.form.submit()"'); echo '' . "\n"; } if (isset($_GET['manufacturers_id']) && ($_GET['manufacturers_id'] != '') && (!isset($_GET['filter_id']))) { $get_vars = tep_draw_hidden_field('manufacturers_id', $_GET['manufacturers_id']); } elseif (isset($_GET['manufacturers_id']) && ($_GET['manufacturers_id'] != '') && (isset($_GET['filter_id']) && ($_GET['filter_id'] != ''))) { $get_vars = tep_draw_hidden_field('manufacturers_id', $_GET['manufacturers_id']) . tep_draw_hidden_field('filter_id', $_GET['filter_id']); } else { $get_vars = ''; } ?>
' . tep_image_button('button_back.gif', BUTTON_BACK_TO_MAIN) . ''; ?>
'; ?>