Execute($check_query); if ($check->fields['count'] <= 0) { $show_product_notifications= true; } } else { $show_product_notifications= true; } } if ($show_product_notifications == true) { if (isset($_GET['products_id'])) { if (isset($_SESSION['customer_id'])) { $check_query = "select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int)$_GET['products_id'] . "' and customers_id = '" . (int)$_SESSION['customer_id'] . "'"; $check = $db->Execute($check_query); $notification_exists = (($check->fields['count'] > 0) ? true : false); } else { $notification_exists = false; } if ($notification_exists == true) { require($template->get_template_dir('tpl_yes_notifications.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_yes_notifications.php'); } else { require($template->get_template_dir('tpl_no_notifications.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_no_notifications.php'); } $title = BOX_HEADING_NOTIFICATIONS; $box_id = 'productnotifications'; $title_link = false; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } } ?>