</div> <div style="clear: both;"></div> <div class="submitFormButtons" style="text-align: right;"> <?php if ($osC_Services->isStarted('reviews')) { echo '<span>' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, 'reviews&' . osc_get_all_get_params()), osc_draw_image_button('button_reviews.gif', $osC_Language->get('button_reviews'))) . '</span>'; } ?> </div> <?php if ($osC_Services->isStarted('reviews') && osC_Reviews::exists(osc_get_product_id($osC_Product->getID()))) { ?> <p><?php echo $osC_Language->get('number_of_product_reviews') . ' ' . osC_Reviews::getTotal(osc_get_product_id($osC_Product->getID())); ?> </p> <?php } ?> <script type=text/javascript> window.addEvent('domready', function(){ $('defaultProductImage').addEvent('click',function(e){
function osC_Products_Reviews() { global $osC_Services, $osC_Session, $osC_Language, $osC_Breadcrumb, $osC_Product, $osC_Customer, $osC_NavigationHistory; if ($osC_Services->isStarted('reviews') === false) { osc_redirect(osc_href_link(FILENAME_DEFAULT)); } $this->_page_title = $osC_Language->get('reviews_heading'); if ($osC_Services->isStarted('breadcrumb')) { $osC_Breadcrumb->add($osC_Language->get('breadcrumb_reviews'), osc_href_link(FILENAME_PRODUCTS, $this->_module)); } if (is_numeric($_GET[$this->_module])) { if (osC_Reviews::exists($_GET[$this->_module])) { $osC_Product = new osC_Product(osC_Reviews::getProductID($_GET[$this->_module])); $this->_page_title = $osC_Product->getTitle(); $this->_page_contents = 'reviews_info.php'; if ($osC_Services->isStarted('breadcrumb')) { $osC_Breadcrumb->add($osC_Product->getTitle(), osc_href_link(FILENAME_PRODUCTS, $this->_module . '=' . $_GET[$this->_module])); } } else { $this->_page_contents = 'reviews_not_found.php'; } } else { $counter = 0; foreach ($_GET as $key => $value) { $counter++; if ($counter < 2) { continue; } if ((ereg('^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$', $key) || ereg('^[a-zA-Z0-9 -_]*$', $key)) && $key != $osC_Session->getName()) { if (osC_Product::checkEntry($key) === false) { $this->_page_contents = 'info_not_found.php'; } elseif ($_GET[$this->_module] == 'new') { if ($osC_Customer->isLoggedOn() === false && SERVICE_REVIEW_ENABLE_REVIEWS == 1) { $osC_NavigationHistory->setSnapshot(); osc_redirect(osc_href_link(FILENAME_ACCOUNT, 'login', 'SSL')); } $osC_Product = new osC_Product($key); $this->_page_title = $osC_Product->getTitle(); $this->_page_contents = 'reviews_new.php'; $this->addJavascriptPhpFilename('templates/' . $this->getCode() . '/javascript/products/reviews_new.php'); if ($osC_Services->isStarted('breadcrumb')) { $osC_Breadcrumb->add($osC_Product->getTitle(), osc_href_link(FILENAME_PRODUCTS, $this->_module . '&' . $osC_Product->getKeyword())); $osC_Breadcrumb->add($osC_Language->get('breadcrumb_reviews_new'), osc_href_link(FILENAME_PRODUCTS, $this->_module . '=new&' . $osC_Product->getKeyword())); } if (isset($_GET['action']) && $_GET['action'] == 'process') { $this->_process($osC_Product->getID()); } } else { $osC_Product = new osC_Product($key); $this->_page_title = $osC_Product->getTitle(); $this->_page_contents = 'product_reviews.php'; if ($osC_Services->isStarted('breadcrumb')) { $osC_Breadcrumb->add($osC_Product->getTitle(), osc_href_link(FILENAME_PRODUCTS, $this->_module . '&' . $osC_Product->getKeyword())); } } } break; } if ($counter < 2) { if (osC_Reviews::exists() === false) { $this->_page_contents = 'reviews_not_found.php'; } } } }