[ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 $Id: product_reviews_info.php 3 2006-05-27 04:59:07Z user $ 4 5 osCMax Power E-Commerce 6 http://oscdox.com 7 8 Copyright 2006 osCMax 9 10 Released under the GNU General Public License 11 */ 12 13 // Most of this file is changed or moved to BTS - Basic Template System - format. 14 // For adding in contribution or modification - parts of this file has been moved to: catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change). 15 // catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change). 16 // (Sub 'fallback' with your current template to see if there is a template specific file.) 17 18 require ('includes/application_top.php'); 19 20 // BOF: MOD - Separate Pricing Per Customer 21 // global variable (session) $sppc_customer_group_id -> local variable customer_group_id 22 if(!tep_session_is_registered('sppc_customer_group_id')) { 23 $customer_group_id = '0'; 24 } else { 25 $customer_group_id = $sppc_customer_group_id; 26 } 27 // EOF: MOD - Separate Pricing Per Customer 28 if (isset($HTTP_GET_VARS['reviews_id']) && tep_not_null($HTTP_GET_VARS['reviews_id']) && isset($HTTP_GET_VARS['products_id']) && tep_not_null($HTTP_GET_VARS['products_id'])) { 29 $review_check_query = tep_db_query("select count(*) as total from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "' and r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "'"); 30 $review_check = tep_db_fetch_array($review_check_query); 31 32 if ($review_check['total'] < 1) { 33 tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('reviews_id')))); 34 } 35 } else { 36 tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('reviews_id')))); 37 } 38 39 tep_db_query("update " . TABLE_REVIEWS . " set reviews_read = reviews_read+1 where reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "'"); 40 41 $review_query = tep_db_query("select rd.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name, r.date_added, r.reviews_read, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where r.reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and r.products_id = p.products_id and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '". (int)$languages_id . "'"); 42 $review = tep_db_fetch_array($review_query); 43 44 // BOF: MOD - Separate Pricing Per Customer 45 if(!tep_session_is_registered('sppc_customer_group_id')) { 46 $customer_group_id = '0'; 47 } else { 48 $customer_group_id = $sppc_customer_group_id; 49 } 50 51 if ($customer_group_id !='0') { 52 $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $review['products_id'] . "' and customers_group_id = '" . $customer_group_id . "'"); 53 if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { 54 $review['products_price'] = $customer_group_price['customers_group_price']; 55 } 56 } 57 // EOF: MOD - Separate Pricing Per Customer 58 if ($new_price = tep_get_products_special_price($review['products_id'])) { 59 $products_price = '<span style="text-decoration:line-through">' . $currencies->display_price($review['products_price'], tep_get_tax_rate($review['products_tax_class_id'])) . '</span> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($review['products_tax_class_id'])) . '</span>'; 60 } else { 61 $products_price = $currencies->display_price($review['products_price'], tep_get_tax_rate($review['products_tax_class_id'])); 62 } 63 64 if (tep_not_null($review['products_model'])) { 65 $products_name = $review['products_name'] . '<br><span class="smallText">[' . $review['products_model'] . ']</span>'; 66 } else { 67 $products_name = $review['products_name']; 68 } 69 70 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_REVIEWS_INFO); 71 72 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); 73 74 $content = CONTENT_PRODUCT_REVIEWS_INFO; 75 $javascript = 'popup_window.js'; 76 77 include (bts_select('main', $content_template)); // BTSv1.5 78 79 require (DIR_WS_INCLUDES . 'application_bottom.php'); 80 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Jan 1 13:43:16 2010 | Cross-referenced by PHPXref 0.7 |