public function initialize() { global $lC_Database, $lC_Language, $lC_Currencies, $lC_Image; if (MODULE_CONTENT_FEATURED_PRODUCTS_MAX_DISPLAY > 0) { $limit = ' limit ' . MODULE_CONTENT_FEATURED_PRODUCTS_MAX_DISPLAY; } $Qfeatured = $lC_Database->query('select products_id from :table_featured_products where (str_to_date(expires_date, "%Y-%m-%d") >= str_to_date(now(), "%Y-%m-%d") or expires_date = "0000-00-00 00:00:00") and status = 1 order by rand() asc' . $limit); $Qfeatured->bindTable(':table_featured_products', TABLE_FEATURED_PRODUCTS); $Qfeatured->bindInt(':max_display_featured_products', MODULE_CONTENT_FEATURED_PRODUCTS_MAX_DISPLAY); $Qfeatured->execute(); if (MODULE_CONTENT_FEATURED_PRODUCTS_CACHE > 0) { $Qfeatured->setCache('featured_products-' . $lC_Language->getCode() . '-' . $lC_Currencies->getCode(), MODULE_CONTENT_FEATURED_PRODUCTS_CACHE); } if ($Qfeatured->numberOfRows() > 0) { $this->_content = ''; while ($Qfeatured->next()) { // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW $lC_Product = new lC_Product($Qfeatured->valueInt('products_id')); $this->_content .= '<div class="content-featured-products-container">' . "\n" . ' <div class="content-featured-products-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $lC_Product->getTitle()) . '</div>' . "\n"; if ($lC_Product->hasImage()) { $this->_content .= ' <div class="content-featured-products-image">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $lC_Image->show($lC_Product->getImage(), $lC_Product->getTitle(), 'class="content-featured-products-image-src"')) . '</div>' . "\n"; } $this->_content .= ' <div class="content-featured-products-desc">' . substr(lc_clean_html($lC_Product->getDescription()), 0, 62) . '...</div>' . "\n" . ' <div class="content-featured-products-price pricing-row">' . $lC_Product->getPriceFormated(true) . '</div>' . "\n" . ' <div class="content-featured-products-button pricing-row buy-btn-div"><button class="content-featured-products-add-button" onclick="window.location.href=\'' . lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword() . '&action=cart_add') . '\'" type="button">' . $lC_Language->get('new_products_button_buy_now') . '</button></div>' . "\n" . '</div>' . "\n"; } } $Qfeatured->freeResult(); }
public function getListingOutput() { global $lC_Database, $lC_Language, $lC_Currencies, $lC_Image, $lC_Featured_products; $Qf = $lC_Database->query('select products_id from :table_featured_products where (str_to_date(expires_date, "%Y-%m-%d") >= str_to_date(now(), "%Y-%m-%d") or expires_date = "0000-00-00 00:00:00") and status = 1 order by expires_date desc'); $Qf->bindTable(':table_featured_products', TABLE_FEATURED_PRODUCTS); $Qf->execute(); while ($Qf->next()) { $Qfresults[] = $Qf->valueInt('products_id'); } $output = ''; if ($Qf->numberOfRows() > 0) { foreach ($Qfresults as $featured) { $Qfeatured = $lC_Database->query('select p.products_id, p.products_price, p.products_tax_class_id, p.products_quantity, pd.products_name, pd.products_keyword, pd.products_description, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where p.products_id = :products_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id'); $Qfeatured->bindTable(':table_products', TABLE_PRODUCTS); $Qfeatured->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES); $Qfeatured->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION); $Qfeatured->bindInt(':products_id', $featured); $Qfeatured->bindInt(':default_flag', 1); $Qfeatured->bindInt(':language_id', $lC_Language->getID()); $Qfeatured->execute(); while ($Qfeatured->next()) { $output .= '<div class="content-featured-products-listing-container">'; $output .= ' <div class="content-featured-products-listing-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $Qfeatured->value('products_keyword')), $Qfeatured->value('products_name')) . '</div>' . "\n"; $output .= ' <div class="content-featured-products-listing-description">' . (strlen(lc_clean_html($Qfeatured->value('products_description'))) > 65 ? substr(lc_clean_html($Qfeatured->value('products_description')), 0, 62) . '...' : lc_clean_html($Qfeatured->value('products_description'))) . '</div>' . "\n"; $output .= ' <div class="content-featured-products-listing-price">' . $lC_Currencies->displayPrice($Qfeatured->value('products_price'), $Qfeatured->valueInt('products_tax_class_id')) . '</div>' . "\n"; $output .= ' <div class="content-featured-products-listing-image">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $Qfeatured->value('products_keyword')), $lC_Image->show($Qfeatured->value('image'), $Qfeatured->value('products_name'))) . '</div>' . "\n"; if (DISABLE_ADD_TO_CART == 1 && $Qfeatured->valueInt('products_quantity') < 1) { $output .= ' <div class="content-featured-products-listing-buy-now"><button type="button" class="content-featured-products-listing-buy-now-button" disabled>' . $lC_Language->get('out_of_stock') . '</button></div>' . "\n"; } else { $output .= ' <div class="content-featured-products-listing-buy-now"><button type="button" onclick="document.location.href=\'' . lc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $Qfeatured->value('products_keyword') . '&' . lc_get_all_get_params(array('action', 'new')) . '&action=cart_add') . '\'" class="content-featured-products-listing-buy-now-button">' . $lC_Language->get('button_buy_now') . '</button></div>' . "\n"; } $output .= '</div>' . "\n"; } } } else { $output .= '<div class="content-specials-listing-name">' . $lC_Language->get('text_no_featured_products') . '</div>'; } return $output; }
public function initialize() { global $lC_Database, $lC_Cache, $lC_Language, $lC_Currencies, $lC_Image, $current_category_id; $data = array(); if ($lC_Cache->isEnabled() && MODULE_CONTENT_NEW_PRODUCTS_CACHE > 0 && $lC_Cache->read('new_products-' . $lC_Language->getCode() . '-' . $lC_Currencies->getCode() . '-' . $current_category_id, MODULE_CONTENT_NEW_PRODUCTS_CACHE)) { $data = $lC_Cache->getCache(); } else { if ($current_category_id < 1) { $Qproducts = $lC_Database->query('select products_id from :table_products where products_status = :products_status and parent_id = :parent_id order by products_date_added desc limit :max_display_new_products'); } else { $Qproducts = $lC_Database->query('select distinct p2c.products_id from :table_products p, :table_products_to_categories p2c, :table_categories c where c.parent_id = :category_parent_id and c.categories_id = p2c.categories_id and p2c.products_id = p.products_id and p.products_status = :products_status and p.parent_id = :parent_id order by p.products_date_added desc limit :max_display_new_products'); $Qproducts->bindTable(':table_products_to_categories', TABLE_PRODUCTS_TO_CATEGORIES); $Qproducts->bindTable(':table_categories', TABLE_CATEGORIES); $Qproducts->bindInt(':category_parent_id', $current_category_id); } $Qproducts->bindTable(':table_products', TABLE_PRODUCTS); $Qproducts->bindInt(':products_status', 1); $Qproducts->bindInt(':parent_id', 0); $Qproducts->bindInt(':max_display_new_products', MAX_DISPLAY_PRODUCTS_NEW); $Qproducts->execute(); while ($Qproducts->next()) { // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW $lC_Product = new lC_Product($Qproducts->valueInt('products_id')); $data[$lC_Product->getID()] = $lC_Product->getData(); $data[$lC_Product->getID()]['display_price'] = $lC_Product->getPriceFormated(true); $data[$lC_Product->getID()]['display_image'] = $lC_Product->getImage(); } if ($lC_Cache->isEnabled()) { $lC_Cache->write($data); } } if (!empty($data)) { $this->_content = ''; foreach ($data as $product) { $this->_content .= '<div class="content-new-products-container">' . "\n"; $this->_content .= ' <div class="content-new-products-image">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $product['keyword']), $lC_Image->show($product['display_image'], $product['name'], 'class="content-new-products-image-src"')) . '</div>' . "\n" . ' <div class="content-new-products-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $product['keyword']), $product['name']) . '</div>' . "\n" . ' <div class="content-new-products-desc">' . (strlen(lc_clean_html($product['description'])) > 65 ? substr(lc_clean_html($product['description']), 0, 62) . '...' : lc_clean_html($product['description'])) . '</div>' . "\n" . ' <div class="content-new-products-price pricing-row">' . $product['display_price'] . '</div>' . "\n" . ' <div class="content-new-products-button pricing-row buy-btn-div"><button class="content-new-products-add-button" onclick="window.location.href=\'' . lc_href_link(FILENAME_PRODUCTS, $product['keyword'] . '&action=cart_add') . '\'" type="button">' . $lC_Language->get('new_products_button_buy_now') . '</button></div>' . "\n"; $this->_content .= '</div>' . "\n"; } } }
public function getListingOutput() { global $lC_Database, $lC_Language, $lC_Currencies, $lC_Image; $Qspecials = $lC_Database->query('select p.products_id, p.products_price, p.products_tax_class_id, p.products_quantity, pd.products_name, pd.products_keyword, pd.products_description, s.specials_new_products_price, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd, :table_specials s where p.products_status = 1 and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = :language_id and s.status = 1 order by s.specials_date_added desc'); $Qspecials->bindTable(':table_products', TABLE_PRODUCTS); $Qspecials->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES); $Qspecials->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION); $Qspecials->bindTable(':table_specials', TABLE_SPECIALS); $Qspecials->bindInt(':default_flag', 1); $Qspecials->bindInt(':language_id', $lC_Language->getID()); $Qspecials->setBatchLimit(isset($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : 1, MAX_DISPLAY_SPECIAL_PRODUCTS); $Qspecials->execute(); $output = ''; if ($Qspecials->numberOfRows() > 0) { while ($Qspecials->next()) { $output .= '<div class="content-specials-listing-container">'; $output .= ' <div class="content-specials-listing-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $Qspecials->value('products_keyword')), $Qspecials->value('products_name')) . '</div>' . "\n"; $output .= ' <div class="content-specials-listing-description">' . (strlen(lc_clean_html($Qspecials->value('products_description'))) > 65 ? substr(lc_clean_html($Qspecials->value('products_description')), 0, 62) . '...' : lc_clean_html($Qspecials->value('products_description'))) . '</div>' . "\n"; $output .= ' <div class="content-specials-listing-price"><s>' . $lC_Currencies->displayPrice($Qspecials->value('products_price'), $Qspecials->valueInt('products_tax_class_id')) . '</s> <span class="product-special-price">' . $lC_Currencies->displayPrice($Qspecials->value('specials_new_products_price'), $Qspecials->valueInt('products_tax_class_id')) . '</span></div>' . "\n"; $output .= ' <div class="content-specials-listing-image">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $Qspecials->value('products_keyword')), $lC_Image->show($Qspecials->value('image'), $Qspecials->value('products_name'))) . '</div>' . "\n"; if (DISABLE_ADD_TO_CART == 1 && $Qspecials->valueInt('products_quantity') < 1) { $output .= ' <div class="content-specials-listing-buy-now"><button type="button" class="content-specials-listing-buy-now-button" disabled>' . $lC_Language->get('out_of_stock') . '</button></div>' . "\n"; } else { $output .= ' <div class="content-specials-listing-buy-now"><button type="button" onclick="document.location.href=\'' . lc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $Qspecials->value('products_keyword') . '&' . lc_get_all_get_params(array('action', 'new')) . '&action=cart_add') . '\'" class="content-specials-listing-buy-now-button">' . $lC_Language->get('button_buy_now') . '</button></div>' . "\n"; } $output .= '</div>' . "\n"; } } else { $output .= '<div class="content-specials-listing-name">' . $lC_Language->get('text_no_specials') . '</div>'; } return $output; }
if ($access < 99) { $show_buy_now = false; } } if (strtotime($lC_Product->getDateAvailable()) <= strtotime(lC_Datetime::getShort())) { $output .= '<div class="product-listing-module-items">'; for ($col = 0, $n = sizeof($column_list); $col < $n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $output .= '<div class="product-listing-module-model">' . $lC_Product->getModel() . '</div>' . "\n"; break; case 'PRODUCT_LIST_NAME': if (isset($_GET['manufacturers'])) { $output .= '<div class="product-listing-module-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword() . '&manufacturers=' . $_GET['manufacturers']), $lC_Product->getTitle()) . '</div>' . "\n" . '<div class="product-listing-module-description">' . lc_clean_html($lC_Product->getBlurb()) . '</div>' . "\n"; } else { $output .= '<div class="product-listing-module-name">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword() . ($cPath ? '&cPath=' . $cPath : '')), $lC_Product->getTitle()) . '</div>' . "\n" . '<div class="product-listing-module-description">' . lc_clean_html($lC_Product->getBlurb()) . '</div>' . "\n"; } break; case 'PRODUCT_LIST_MANUFACTURER': if ($lC_Product->hasManufacturer()) { $output .= '<div class="product-listing-module-manufacturer">' . lc_link_object(lc_href_link(FILENAME_DEFAULT, 'manufacturers=' . $lC_Product->getManufacturerID()), $lC_Product->getManufacturer()) . '</div>' . "\n"; } else { $output .= '<div class="product-listing-module-manufacturer"></div>' . "\n"; } break; case 'PRODUCT_LIST_PRICE': $output .= '<div class="product-listing-module-price pricing-row">' . ($show_price ? $lC_Product->getPriceFormated(true) : null) . '</div>' . "\n"; break; case 'PRODUCT_LIST_QUANTITY': $output .= '<div class="product-listing-module-quantity">' . $lC_Product->getQuantity() . '</div>' . "\n"; break;
?> </h1> <div class="row"> <div class="col-sm-4 col-lg-4 large-padding-left"> <div class="thumbnail align-center large-padding-top"> <?php echo lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $lC_Image->show($lC_Product->getImage(), $lC_Product->getTitle(), 'class="img-responsive content-tell-a-friend-image-src"', 'small')); ?> <div class="caption"> <h3 style="line-height:1.1;"> <?php echo lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $lC_Product->getTitle()); ?> </h3> <p class=""><?php echo strlen($lC_Product->getDescription()) > 60 ? substr(lc_clean_html($lC_Product->getDescription()), 0, 57) . '...' : lc_clean_html($lC_Product->getDescription()); ?> </p> <div class="row pricing-row"> <div class="col-sm-6 col-lg-6"> <p class="lead"><?php echo $lC_Product->getPriceFormated(); ?> </p> </div> <div class="col-sm-6 col-lg-6 no-margin-left buy-btn-div"> <button class="btn btn-success btn-block" onclick="window.location.href='<?php echo lc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $lC_Product->getKeyword() . '&' . lc_get_all_get_params(array('action', 'new')) . '&action=cart_add'); ?> '" type="button"><?php echo $lC_Language->get('button_buy_now');
/** * Cleans OGP and Meta tags and restrict OGP and Meta description to 300 characters * * @access private * @return string */ public function cleanMetaTags($data) { $string = lc_clean_html($data); //clean html tags if any $string = str_replace(array("\r\n", "\r", "\n", "'", "\"", ";", "<", ">"), "", $string); // remove unwanted characters if (strlen($string) > 300) { $stringCut = substr($string, 0, 300); // truncate string $string = substr($stringCut, 0, strrpos($stringCut, ' ')); // make sure it ends in a word } return $string; }
public function lC_Products_Products() { global $lC_Database, $lC_Services, $lC_Session, $lC_Language, $lC_Breadcrumb, $lC_Product, $lC_Image, $lC_Currencies, $cPath_array; $template_code = isset($_SESSION['template']['code']) && $_SESSION['template']['code'] != NULL ? $_SESSION['template']['code'] : 'core'; if (empty($_GET) === false) { $id = false; // PHP < 5.0.2; array_slice() does not preserve keys and will not work with numerical key values, so foreach() is used foreach ($_GET as $key => $value) { $key = end(explode("/", $key)); if ((preg_match('/^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$/', $key) || preg_match('/^[a-zA-Z0-9 -_]*$/', $key)) && $key != $lC_Session->getName()) { $id = $key; } break; } if ($id !== false && lC_Product::checkEntry($id)) { $lC_Product = new lC_Product($id); $lC_Product->incrementCounter(); if (strtotime($lC_Product->getDateAvailable()) <= strtotime(lC_Datetime::getShort())) { $this->addPageTags('description', substr(strip_tags($lC_Product->getDescription()), 0, 300)); $this->addPageTags('keywords', $lC_Product->getTitle()); $this->addPageTags('keywords', $lC_Product->getModel()); if ($lC_Product->hasTags()) { $this->addPageTags('keywords', $lC_Product->getTags()); } $this->addOGPTags('type', 'product'); $this->addOGPTags('title', $lC_Product->getTitle() . ' ' . $lC_Product->getModel()); $this->addOGPTags('description', $lC_Currencies->displayPrice($lC_Product->getPrice(), $lC_Product->getTaxClassID()) . ' - ' . $lC_Product->getTitle() . ' ' . lc_clean_html($lC_Product->getDescription())); $this->addOGPTags('url', lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword(), 'NONSSL', false, true, true)); $this->addOGPTags('image', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . $template_code . '/images/logo.png'); $this->addOGPTags('image', HTTP_SERVER . DIR_WS_CATALOG . $lC_Image->getAddress($lC_Product->getImage(), 'large')); if ($lC_Product->getImages() != '') { foreach ($lC_Product->getImages() as $key => $value) { if ($value['default_flag'] == true) { continue; } if (file_exists(DIR_FS_CATALOG . $lC_Image->getAddress($value['image'], 'popup'))) { $this->addOGPTags('image', HTTP_SERVER . DIR_WS_CATALOG . $lC_Image->getAddress($value['image'], 'large')); } } } lC_Services_category_path::process($lC_Product->getCategoryID()); if (empty($cPath_array) && $_GET['cPath'] == '' && isset($lC_Services) && $lC_Services->isStarted('seo')) { foreach ($_GET as $cats => $values) { $cats = explode("/", $cats); foreach ($cats as $cat) { $Qcid = $lC_Database->query('select item_id from :table_permalinks where permalink = :permalink and type = 1 and language_id = :language_id'); $Qcid->bindTable(':table_permalinks', TABLE_PERMALINKS); $Qcid->bindValue(':permalink', $cat); $Qcid->bindInt(':language_id', $lC_Language->getID()); $Qcid->execute(); $cPath_array[] = $Qcid->valueInt('item_id'); } } } if ($lC_Services->isStarted('breadcrumb')) { if (isset($_GET['cPath']) && $_GET['cPath'] != '') { $path = $_GET['cPath']; } else { $path = implode("_", $cPath_array); } $lC_Breadcrumb->add($lC_Product->getTitle(), lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), $path); } $this->_page_title = $lC_Product->getTitle(); } else { $this->_page_title = $lC_Language->get('product_not_found_heading'); $this->_page_contents = 'info_not_available.php'; } } else { $this->_page_title = $lC_Language->get('product_not_found_heading'); $this->_page_contents = 'info_not_found.php'; } } else { $this->_page_title = $lC_Language->get('product_not_found_heading'); $this->_page_contents = 'info_not_found.php'; } }
public function lC_Products_Reviews() { global $lC_Services, $lC_Session, $lC_Language, $lC_Breadcrumb, $lC_Product, $lC_Customer, $lC_NavigationHistory, $lC_Image, $lC_Currencies; if ($lC_Services->isStarted('reviews') === false) { lc_redirect(lc_href_link(FILENAME_DEFAULT)); } $this->_page_title = $lC_Language->get('reviews_heading'); $template_code = isset($_SESSION['template']['code']) && $_SESSION['template']['code'] != NULL ? $_SESSION['template']['code'] : 'core'; $this->addJavascriptPhpFilename('templates/' . $template_code . '/javascript/form_check.js.php'); if ($lC_Services->isStarted('breadcrumb')) { $lC_Breadcrumb->add($lC_Language->get('breadcrumb_reviews'), lc_href_link(FILENAME_PRODUCTS, $this->_module)); } if (is_numeric($_GET[$this->_module])) { if (lC_Reviews::exists($_GET[$this->_module])) { $lC_Product = new lC_Product(lC_Reviews::getProductID($_GET[$this->_module])); $this->_page_title = $lC_Product->getTitle(); $this->addOGPTags('type', 'product'); $this->addOGPTags('title', $lC_Product->getTitle() . ' ' . $lC_Product->getModel()); $this->addOGPTags('description', $lC_Currencies->displayPrice($lC_Product->getPrice(), $lC_Product->getTaxClassID()) . ' - ' . $lC_Product->getTitle() . ' ' . lc_clean_html($lC_Product->getDescription())); $this->addOGPTags('url', lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword(), 'NONSSL', false, true, true)); $this->addOGPTags('image', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . $template_code . '/images/logo.png'); $this->addOGPTags('image', HTTP_SERVER . DIR_WS_CATALOG . $lC_Image->getAddress($lC_Product->getImage(), 'large')); foreach ($lC_Product->getImages() as $key => $value) { if ($value['default_flag'] == true) { continue; } if (file_exists(DIR_FS_CATALOG . $lC_Image->getAddress($value['image'], 'popup'))) { $this->addOGPTags('image', HTTP_SERVER . DIR_WS_CATALOG . $lC_Image->getAddress($value['image'], 'large')); } } } $this->_page_contents = 'reviews_info.php'; if ($lC_Services->isStarted('breadcrumb')) { $lC_Breadcrumb->add($lC_Product->getTitle(), lc_href_link(FILENAME_PRODUCTS, $this->_module . '=' . $_GET[$this->_module])); } } else { $this->_page_contents = 'reviews_not_found.php'; } $counter = 0; foreach ($_GET as $key => $value) { $counter++; if ($counter < 2) { continue; } if ((preg_match('/^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$/', $key) || preg_match('/^[a-zA-Z0-9 -_]*$/', $key)) && $key != $lC_Session->getName()) { if (lC_Product::checkEntry($key) === false) { $this->_page_contents = 'info_not_found.php'; } elseif ($_GET[$this->_module] == 'new') { if ($lC_Customer->isLoggedOn() === false && SERVICE_REVIEW_ENABLE_REVIEWS == 1) { $lC_NavigationHistory->setSnapshot(); lc_redirect(lc_href_link(FILENAME_ACCOUNT, 'login', 'SSL')); } $lC_Product = new lC_Product($key); $this->_page_title = $lC_Product->getTitle(); $this->_page_contents = 'reviews_new.php'; if ($lC_Services->isStarted('breadcrumb')) { $lC_Breadcrumb->add($lC_Product->getTitle(), lc_href_link(FILENAME_PRODUCTS, $this->_module . '&' . $lC_Product->getKeyword())); $lC_Breadcrumb->add($lC_Language->get('breadcrumb_reviews_new'), lc_href_link(FILENAME_PRODUCTS, $this->_module . '=new&' . $lC_Product->getKeyword())); } if (isset($_GET['action']) && $_GET['action'] == 'process') { $this->_process($lC_Product->getID()); } } else { $lC_Product = new lC_Product($key); $this->_page_title = $lC_Product->getTitle(); $this->_page_contents = 'product_reviews.php'; if ($lC_Services->isStarted('breadcrumb')) { $lC_Breadcrumb->add($lC_Product->getTitle(), lc_href_link(FILENAME_PRODUCTS, $this->_module . '&' . $lC_Product->getKeyword())); } } } break; } if ($counter < 2) { if (lC_Reviews::exists() === false) { $this->_page_contents = 'reviews_not_found.php'; } } }