Talis Posted May 12, 2010 Share Posted May 12, 2010 Hello All, I've got a bit of a strange one here that i just can't find the source of. All pages display correctly with a black background set in the CSS BODY of stylesheet.css with the exception of product_info.php which is white. I've tried setting bgcolor="#000000" manually in the <body> of product_info.php but this had no effect. I've searched through the code but can't for the life of me find what's causing this. Below is the code for the page. Any ideas gratefully received :) <?php /* $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ /* Additional code for following contained: Flash Description Image Extra Product Fields */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); // begin Extra Product Fields $epf = array(); if ($product_check['total'] > 0) { $epf_query = tep_db_query("select e.epf_id, e.epf_uses_value_list, e.epf_show_parent_chain, e.epf_use_as_meta_keyword, l.epf_label from " . TABLE_EPF . " e join " . TABLE_EPF_LABELS . " l where e.epf_status and (e.epf_id = l.epf_id) and (l.languages_id = " . (int)$languages_id . ") and l.epf_active_for_language order by epf_order"); while ($e = tep_db_fetch_array($epf_query)) { // retrieve all active extra fields $epf[] = array('id' => $e['epf_id'], 'label' => $e['epf_label'], 'uses_list' => $e['epf_uses_value_list'], 'show_chain' => $e['epf_show_parent_chain'], 'search' => $e['epf_advanced_search'], 'keyword' => $e['epf_use_as_meta_keyword'], 'field' => 'extra_value' . ($e['epf_uses_value_list'] ? '_id' : '') . $e['epf_id']); } $query = "select p.products_date_added, p.products_last_modified, pd.products_name"; foreach ($epf as $e) { if ($e['keyword']) $query .= ", pd." . $e['field']; } $query .= " from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"; $pname = tep_db_fetch_array(tep_db_query($query)); $datemod = substr((tep_not_null($pname['products_last_modified']) ? $pname['products_last_modified'] : $pname['products_date_added']), 0, 10); } else { $pname = TEXT_PRODUCT_NOT_FOUND; $datemod = date('Y-m-d'); } // end Extra Product Fields /* CBW insert flash option */ /* $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); */ $product_flash_query = tep_db_query("select p.products_id, p.products_flash from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_flash = tep_db_fetch_array($product_flash_query); $flash_file = $product_flash['products_flash']; /* eof insert */ ?> <!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; ?>"> <!-- Replaced below <title><?php// echo TITLE; ?></title> --> <!-- begin Extra Product Fields //--> <?php /*** Begin Header Tags SEO ***/ if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <?php } /*** End Header Tags SEO ***/ ?> <meta name="Description" content="<?php echo htmlspecialchars($pname['products_name']); ?>"> <?php foreach ($epf as $e) { if ($e['keyword'] && tep_not_null($pname[$e['field']])) { echo '<meta name ="Keywords" content="'; if ($e['uses_list']) { echo htmlspecialchars(tep_get_extra_field_list_value($pname[$e['field']])); } else { echo htmlspecialchars($pname[$e['field']]); } echo '">' . "\n"; } } ?> <!-- end Extra Product Fields //--> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150') } //--></script> <!-- CBW insert flash option --> <!-- Required for flash animation rendering --> <?php if (tep_not_null($flash_file)) { ?> <script type="text/javascript" src="ufo.js"></script> <script type="text/javascript"> var FO = <?php echo '{ movie:"images/'.$flash_file.'", width: "'.FLASH_IMAGE_WIDTH.'", height: "'.FLASH_IMAGE_HEIGHT.'", majorversion:"6",build:"40" };'; ?> UFO.create(FO, "flashdiv"); </script> <?php } ?> <!-- eof insert --> </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> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php //require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php if ($product_check['total'] < 1) { ?> <tr> <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><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> <?php } else { /* CBW insert flash option - Replaced by Product Extra Fields code */ /* $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); */ /*Active code disabled- $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_flash, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); */ /* eof insert */ // begin Product Extra Fields - Note added p.products_flash for Flash function from above $query = "select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_flash, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id"; foreach ($epf as $e) { $query .= ", pd." . $e['field']; } $query .= " from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"; $product_info_query = tep_db_query($query); // end Product Extra Fields $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"> <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"> <!-- CBW insert flash option <script language="javascript"> document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); </script> eof insert --> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> <!-- CBW insert flash option --> <?php /* Check for flash file */ if (tep_not_null($flash_file)) { echo '<div id="flashdiv"></div>'; } /* otherwise display image */ else { echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; } ?> <!-- eof insert --> </td> </tr> </table> <?php } ?> <?php // begin Extra Product Fields foreach ($epf as $e) { $mt = ($e['uses_list'] ? ($product_info[$e['field']] == 0) : !tep_not_null($product_info[$e['field']])); if (!$mt) { // only display if information is set for product echo '<b>' . $e['label'] . ': </b>'; if ($e['uses_list']) { echo tep_get_extra_field_list_value($product_info[$e['field']], $e['show_chain']); } else { echo $product_info[$e['field']]; } echo '<br>'; } } // end Extra Product Fields $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <?php } ?> </table> <?php } ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <tr> <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (tep_not_null($product_info['products_url'])) { ?> <tr> <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><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 class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <!-- Ultimate Osc_translator (product_description) Start --> <tr> <td> <table style="border:1px solid #BBBBBB;background:#ffffff;" width="100%" border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main"> <link rel="stylesheet" href="osc_translator/translator.css" type="text/css" media="screen"> <script type='text/javascript' src="/osc_translator/prototype1.6.1.js"></script> <script type='text/javascript' src="/osc_translator/EventDispatcher.js"></script> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type='text/javascript'> google.load("language", "1"); var translator = false; function init(){ var str = $("source").innerHTML; var triggerCollection = $("langSelect").select("li"); triggerCollection.invoke("observe", "click", handleTriggerClick); translator = new Translator("source", "p,ul"); translator.addEventListener("complete", function(obj){ //console.log("The translation has finished %o", obj); }); translator.addEventListener("begin", function(obj){ //console.log("Translation has begun! %o", obj); }); //console.log(translator.textNodeCollection); } function handleTriggerClick(e){ var lang = e.element().getAttribute("lang"); var str = $("source").innerHTML; translator.translate(lang); } function insertToForeign(obj){ $("display").innerHTML = obj.translation; } google.setOnLoadCallback(init); var Translator = Class.create(EventDispatcher, { initialize : function(element, selector, config){ this.element = $(element); this.preservedHTML = this.element.innerHTML; this.config = Object.extend(this.getDefaultConfig(), config); this.textNodeCollection = this.collectChildren(selector); this.preservedParentHash = {}; this.placeHolderHash = {}; this.entityWasher = new Element("div"); this.textNodeCollection = this.textNodeCollection.findAll(this.purifyTextNode); }, purifyTextNode : function(node){ try{ if(!node) return false; return node.nodeType == 3; } catch(e){ return false; } }, getDefaultConfig : function(){ return { maxLength : 1000, srcLang : "en", recursive : true, type : "text" }; }, collectChildren : function(selector){ return this.element.select(selector).collect(this.collectTextNodes.bind(this)).flatten(); }, collectTextNodes : function(element){ var self = this; var stack = $A(element.childNodes).collect(function(child){ if(child.nodeType == 3 && child.nodeValue.length < self.config.maxLength && child.nodeValue.search(/^\s+$/g) == -1) return child; else if(child.nodeType == 3 && child.nodeValue.length > self.config.maxLength) return self.splitTextNode(child); else if(child.nodeType == 1 && self.config.recursive) return self.collectTextNodes(child); }); return stack; }, splitStringByMax : function(text){ var offset = 0; var textArr = []; while(text.length > this.config.maxLength){ var tmp = text.substr(0, this.config.maxLength); offset = tmp.lastIndexOf(" "); var subText = text.substr(0, offset); text = text.substr(offset); textArr.push(subText); } textArr.push(text); return textArr; }, splitTextNode : function(node){ var nodeStack = []; var textArr = this.splitStringByMax(node.nodeValue); var prevNode = false; textArr.each(function(text, itr){ var newNode = document.createTextNode(text); nodeStack.push(newNode); if(node.nextSibling != null && !prevNode) node.parentNode.insertBefore(newNode, node.nextSibling); else if(prevNode && prevNode.nextSibling != null) node.parentNode.insertBefore(newNode, prevNode.nextSibling); else node.parentNode.appendChild(newNode); prevNode = newNode; }); node.parentNode.removeChild(node); return nodeStack; }, getEventBeginObject : function(destLang){ return { destLang : destLang, srcLang : this.config.srcLang, srcLangNodes : this.textNodeCollection, srcHTML : this.preservedHTML } }, getEventCompleteObject : function(result){ return { srcLangNodes : this.textNodeCollection, destLangNodes : this.translationStack, destLangHTML : this.element.innerHTML, srcLangHTML : this.preservedHTML, result : result, resultStack : this.resultStack } }, finishTranslation : function(result){ this.translating = false; this.dispatchEvent("complete", this.getEventCompleteObject(result)); }, translate : function(destLang){ if(this.translating) return false; var self = this; this.dispatchEvent("begin", this.getEventBeginObject(destLang)); this.textNodeCount = this.textNodeCollection.length; this.translationStack = []; this.resultStack = []; this.textNodeCollection.each(function(node, index){ self.translating = true; google.language.translate(node.nodeValue, self.config.srcLang, destLang, self.handleTranslation.bind(self, node, index)); }); return true; }, getPreservedParent : function(node, index){ if(this.preservedParentHash[index]) return this.preservedParentHash[index]; return this.preservedParentHash[index] = node.parentNode; }, getPlaceHolder : function(index){ return this.placeHolderHash[index] || false; }, setPlaceHolder : function(node, index){ this.placeHolderHash[index] = node; }, handleTranslation : function(node, index, obj){ try{ var parent = this.getPreservedParent(node, index); this.entityWasher.innerHTML = obj.translation; var translatedText = this.entityWasher.innerHTML; if(node.nodeValue.search(/^\s/) > -1) translatedText = " " + translatedText; if(node.nodeValue.search(/\s$/) > -1) translatedText = translatedText + " "; var newText = document.createTextNode(translatedText); if(this.getPlaceHolder(index)) parent.replaceChild(newText, this.getPlaceHolder(index)); else parent.replaceChild(newText, node); this.setPlaceHolder(newText, index); this.translationStack.push(newText); this.resultStack.push(obj); this.textNodeCount--; if(this.textNodeCount <= 0) this.finishTranslation(obj); } catch(e){ console.log("Error has occured with handling translation error = %o arguments = %o", e, arguments); } } }); </script> <div id="display" style="margin-top:10px;margin-bottom:10px;margin-left:10px;margin-right:10px;"> <ul id="langSelect" class="select" style="margin-left:0px; margin-bottom:5px;"> <b><font face="verdana" size="1" color="gray">Description Translator:</font></b><br> <li><img lang="en" src="images/flag/britain.gif" alt="English"></li> <li><img lang="es" src="images/flag/spain.gif" alt="Spanish"></li> <li><img lang="fr" src="images/flag/france.gif" alt="French"></li> <li><img lang="it" src="images/flag/italy.gif" alt="Italian"></li> <li><img lang="pt-PT" src="images/flag/portugal.gif" alt="Portuguese"></li> <li><img lang="de" src="images/flag/germany.gif" alt="German"></li> <li><img lang="nl" src="images/flag/netherlands.gif" alt="Dutch"></li> <li><img lang="el" src="images/flag/greece.gif" alt="Greek"></li> <li><img lang="ru" src="images/flag/russia.gif" alt="Russian"></li> <li><img lang="zh-CN" src="images/flag/sim_china.gif" alt="Chinese(Simplified)"></li> <li><img lang="zh-TW" src="images/flag/trad_china.gif" alt="Chinese(Traditional)"></li> <li><img lang="ja" src="images/flag/japan.gif" alt="Japanese"></li> <li><img lang="ko" src="images/flag/korea.gif" alt="Korean"></li> <li><img lang="hi" src="images/flag/india.gif" alt="Hindi"></li> <li><img lang="ar" src="images/flag/arabic.gif" alt="Arabic"></li> </ul> <div id="source" class="transarea"> <p><?php echo stripslashes($product_info['products_description']); ?></p> </div> </div> </td> </tr></table> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <!-- Ultimate Osc_translator (product_description) End --> </table> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> </td> </tr> </table></form></td> <!-- 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> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Link to comment Share on other sites More sharing options...
Guest Posted May 12, 2010 Share Posted May 12, 2010 <?php/* $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License*/ /* Additional code for following contained: Flash Description Image Extra Product Fields */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); // begin Extra Product Fields $epf = array(); if ($product_check['total'] > 0) { $epf_query = tep_db_query("select e.epf_id, e.epf_uses_value_list, e.epf_show_parent_chain, e.epf_use_as_meta_keyword, l.epf_label from " . TABLE_EPF . " e join " . TABLE_EPF_LABELS . " l where e.epf_status and (e.epf_id = l.epf_id) and (l.languages_id = " . (int)$languages_id . ") and l.epf_active_for_language order by epf_order"); while ($e = tep_db_fetch_array($epf_query)) { // retrieve all active extra fields $epf[] = array('id' => $e['epf_id'], 'label' => $e['epf_label'], 'uses_list' => $e['epf_uses_value_list'], 'show_chain' => $e['epf_show_parent_chain'], 'search' => $e['epf_advanced_search'], 'keyword' => $e['epf_use_as_meta_keyword'], 'field' => 'extra_value' . ($e['epf_uses_value_list'] ? '_id' : '') . $e['epf_id']); } $query = "select p.products_date_added, p.products_last_modified, pd.products_name"; foreach ($epf as $e) { if ($e['keyword']) $query .= ", pd." . $e['field']; } $query .= " from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"; $pname = tep_db_fetch_array(tep_db_query($query)); $datemod = substr((tep_not_null($pname['products_last_modified']) ? $pname['products_last_modified'] : $pname['products_date_added']), 0, 10); } else { $pname = TEXT_PRODUCT_NOT_FOUND; $datemod = date('Y-m-d'); }// end Extra Product Fields /* CBW insert flash option */ /* $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); */ $product_flash_query = tep_db_query("select p.products_id, p.products_flash from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_flash = tep_db_fetch_array($product_flash_query); $flash_file = $product_flash['products_flash']; /* eof insert */ ?><!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; ?>"><!-- Replaced below <title><?php// echo TITLE; ?></title> --><!-- begin Extra Product Fields //--><?php/*** Begin Header Tags SEO ***/if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php');} else {?> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title><?php}/*** End Header Tags SEO ***/?><meta name="Description" content="<?php echo htmlspecialchars($pname['products_name']); ?>"><?phpforeach ($epf as $e) { if ($e['keyword'] && tep_not_null($pname[$e['field']])) { echo '<meta name ="Keywords" content="'; if ($e['uses_list']) { echo htmlspecialchars(tep_get_extra_field_list_value($pname[$e['field']])); } else { echo htmlspecialchars($pname[$e['field']]); } echo '">' . "\n"; }}?><!-- end Extra Product Fields //--> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"><link rel="stylesheet" type="text/css" href="stylesheet.css"><script language="javascript"><!--function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')}//--></script> <!-- CBW insert flash option --><!-- Required for flash animation rendering --> <?php if (tep_not_null($flash_file)) { ?> <script type="text/javascript" src="ufo.js"></script> <script type="text/javascript">var FO = <?php echo '{ movie:"images/'.$flash_file.'", width: "'.FLASH_IMAGE_WIDTH.'", height: "'.FLASH_IMAGE_HEIGHT.'", majorversion:"6",build:"40" };'; ?> UFO.create(FO, "flashdiv");</script> <?php } ?> <!-- eof insert --> </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%" [color=#FF0000][b] bgcolor="000000"[/b][/color] cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"><!-- left_navigation //--><?php //require(DIR_WS_INCLUDES . 'column_left.php'); ?><!-- left_navigation_eof //--> </table></td> I may have overlooked it, but I didn't see where you added the color in product_info.php. I added it where I think (?) it should be. You'll find it in red bold font. I hope that helps or someone corrects me if I'm wrong. Paul Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.