http://www.z-is.net All rights reserved. This program is free software licensed under the GNU General Public License (GPL). This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *********************************************************************************** based on: (c) 2000 - 2001 The Exchange Project (c) 2001 - 2003 osCommerce, Open Source E-Commerce Solutions Released under the GNU General Public License *********************************************************************************** ***/ require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $languages = tep_get_languages(); $in_products_id = tep_db_prepare_input($HTTP_GET_VARS['in_products_id']); switch ($HTTP_GET_VARS['action']) { case 'new': $xsell_query = tep_db_query("INSERT INTO ". TABLE_PRODUCTS_XSELL . " (products_id, xsell_id) VALUES (" . $HTTP_GET_VARS['in_products_id'] . ", " . $HTTP_GET_VARS['iID'] . ")"); break; case 'delete': $xsell_query = tep_db_query("DELETE FROM ". TABLE_PRODUCTS_XSELL . " WHERE xsell_id='" . $HTTP_GET_VARS['iID'] . "'"); break; } if (isset($in_products_id) && tep_not_null($in_products_id)) { $product_query = tep_db_query("SELECT products_name FROM " . TABLE_PRODUCTS_DESCRIPTION . " WHERE products_id='" . $in_products_id . "'"); $product = tep_db_fetch_array($product_query); $xsell_query = tep_db_query("SELECT pd.products_name,px.xsell_id,p.products_price, p.products_tax_class_id FROM " . TABLE_PRODUCTS_DESCRIPTION . " pd LEFT JOIN " . TABLE_PRODUCTS . " p ON p.products_id=pd.products_id LEFT JOIN " . TABLE_PRODUCTS_XSELL . " px ON px.xsell_id=pd.products_id WHERE px.products_id='" . $in_products_id . "' AND pd.language_id = '" . $languages_id . "' "); } ?> > <?php echo TITLE; ?>
' . "\n"; } if ($HTTP_GET_VARS['search']) { echo ' ' . "\n"; echo '
 
xsell_id) ) { echo ' ' . "\n"; #regt mi der scheiss heind aaf! } else { echo ' ' . "\n"; #regt mi der scheiss heind aaf! } ?> '' . $xinfo->products_name . ''); $contents[] = array('align' => 'center', 'text' => '' . tep_image_button('button_delete.gif', IMAGE_DELETE) . ''); ?>
display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])); ?>
' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo tep_draw_form('search', FILENAME_CROSSSELL_PRODUCS, tep_get_all_get_params(array('action')), 'get'); echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search', $HTTP_GET_VARS['search']); echo tep_draw_hidden_field('in_products_id', $HTTP_GET_VARS['in_products_id']); echo tep_draw_hidden_field('iID', $HTTP_GET_VARS['iID']); echo ""; echo '
' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; $x_query = tep_db_query("SELECT xsell_id FROM " . TABLE_PRODUCTS_XSELL . " WHERE products_id='" . $HTTP_GET_VARS['in_products_id'] . "'"); $tmp_query = "NOT IN("; while($x_ids = tep_db_fetch_array($x_query)) { $is = "TRUE"; $tmp_query .= $x_ids[xsell_id].", "; } $tmp_query[strlen($tmp_query)-2] = ")"; if(!$is) { $tmp_query = ""; } $products_query = tep_db_query("select p.products_id, p.products_model, pd.products_name, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id " . $tmp_query . " and (pd.products_name like '%" . $HTTP_GET_VARS['search'] . "%' or p.products_model like '%" . $HTTP_GET_VARS['search'] . "') order by p.products_model"); while ($products = tep_db_fetch_array($products_query)) { if (((!$HTTP_GET_VARS['in_products_id']) || (@$HTTP_GET_VARS['in_products_id'] == $products['products_id'])) && (!$xinfo)) { $pInfo = new objectInfo($products); } echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; ?> ' . "\n"; echo ' ' . "\n"; } ?>
' . TABLE_HEADING_MODEL . '' . TABLE_HEADING_NAME . '' . TABLE_HEADING_PRICE . '
' . $products['products_model'] . '' . $products['products_name'] . '' . $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '