function execute() { global $oscTemplate; $OSCOM_Db = Registry::get('Db'); $OSCOM_Language = Registry::get('Language'); if (isset($_GET['products_id'])) { $Qmanufacturer = $OSCOM_Db->prepare('select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from :table_manufacturers m left join :table_manufacturers_info mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = :languages_id), :table_products p where p.products_id = :products_id and p.manufacturers_id = m.manufacturers_id'); $Qmanufacturer->bindInt(':languages_id', $OSCOM_Language->getId()); $Qmanufacturer->bindInt(':products_id', $_GET['products_id']); $Qmanufacturer->execute(); if ($Qmanufacturer->fetch() !== false) { $manufacturer_info_string = null; if (!empty($Qmanufacturer->value('manufacturers_image'))) { $manufacturer_info_string .= '<div>' . HTML::image(OSCOM::linkImage($Qmanufacturer->value('manufacturers_image')), $Qmanufacturer->value('manufacturers_name')) . '</div>'; } if (!empty($Qmanufacturer->value('manufacturers_url'))) { $manufacturer_info_string .= '<div class="text-center"><a href="' . OSCOM::link('redirect.php', 'action=manufacturer&manufacturers_id=' . $Qmanufacturer->valueInt('manufacturers_id')) . '" target="_blank">' . OSCOM::getDef('module_boxes_manufacturer_info_box_homepage', ['manufacturers_name' => $Qmanufacturer->value('manufacturers_name')]) . '</a></div>'; } ob_start(); include 'includes/modules/boxes/templates/manufacturer_info.php'; $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } } }
public static function image($src, $alt = null, $width = null, $height = null, $parameters = '', $responsive = false, $bootstrap_css = '') { if ((empty($src) || $src == OSCOM::linkImage('')) && IMAGE_REQUIRED == 'false') { return false; } // alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default $image = '<img src="' . static::output($src) . '" alt="' . static::output($alt) . '"'; if (isset($alt) && strlen($alt) > 0) { $image .= ' title="' . static::output($alt) . '"'; } if (isset($width) && strlen($width) > 0) { $image .= ' width="' . static::output($width) . '"'; } if (isset($height) && strlen($height) > 0) { $image .= ' height="' . static::output($height) . '"'; } $class = []; if ($responsive === true) { $class[] = 'img-responsive'; } if (!empty($bootstrap_css)) { $class[] = $bootstrap_css; } if (!empty($class)) { $image .= ' class="' . implode(' ', $class) . '"'; } if (!empty($parameters)) { $image .= ' ' . $parameters; } $image .= ' />'; return $image; }
function execute() { global $PHP_SELF, $oscTemplate; $OSCOM_Db = Registry::get('Db'); $OSCOM_Language = Registry::get('Language'); if (basename($PHP_SELF) == 'product_info.php') { $Qproduct = $OSCOM_Db->prepare('select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_quantity, p.products_tax_class_id, p.products_date_available from :table_products p, :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'); $Qproduct->bindInt(':products_id', $_GET['products_id']); $Qproduct->bindInt(':language_id', $OSCOM_Language->getId()); $Qproduct->execute(); if ($Qproduct->fetch() !== false) { $data = array('og:type' => 'product', 'og:title' => $Qproduct->value('products_name'), 'og:site_name' => STORE_NAME); $product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($Qproduct->value('products_description')))), 0, 197) . '...'; $data['og:description'] = $product_description; $products_image = $Qproduct->value('products_image'); $Qimage = $OSCOM_Db->get('products_images', 'image', ['products_id' => $Qproduct->valueInt('products_id')], 'sort_order', 1); if ($Qimage->fetch() !== false) { $products_image = $Qimage->value('image'); } $data['og:image'] = OSCOM::linkImage($products_image); if ($new_price = tep_get_products_special_price($Qproduct->valueInt('products_id'))) { $products_price = $this->format_raw($new_price); } else { $products_price = $this->format_raw($Qproduct->value('products_price')); } $data['product:price:amount'] = $products_price; $data['product:price:currency'] = $_SESSION['currency']; $data['og:url'] = OSCOM::link('product_info.php', 'products_id=' . $Qproduct->valueInt('products_id'), false); $data['product:availability'] = $Qproduct->valueInt('products_quantity') > 0 ? OSCOM::getDef('module_header_tags_product_opengraph_text_in_stock') : OSCOM::getDef('module_header_tags_product_opengraph_text_out_of_stock'); $result = ''; foreach ($data as $key => $value) { $result .= '<meta property="' . HTML::outputProtected($key) . '" content="' . HTML::outputProtected($value) . '" />' . PHP_EOL; } $oscTemplate->addBlock($result, $this->group); } } }
function execute() { global $PHP_SELF, $oscTemplate; if (substr(basename($PHP_SELF), 0, 8) != 'checkout' && tep_not_null(MODULE_BOXES_CARD_ACCEPTANCE_LOGOS)) { $output = NULL; foreach (explode(';', MODULE_BOXES_CARD_ACCEPTANCE_LOGOS) as $logo) { $output .= HTML::image(OSCOM::linkImage('Shop/card_acceptance/' . basename($logo)), null, null, null, null, false); } ob_start(); include 'includes/modules/boxes/templates/card_acceptance.php'; $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } }
function install() { $OSCOM_Db = Registry::get('Db'); $OSCOM_Db->save('configuration', ['configuration_title' => 'Enable OpenSearch Module', 'configuration_key' => 'MODULE_HEADER_TAGS_OPENSEARCH_STATUS', 'configuration_value' => 'True', 'configuration_description' => 'Add shop search functionality to the browser?', 'configuration_group_id' => '6', 'sort_order' => '1', 'set_function' => 'tep_cfg_select_option(array(\'True\', \'False\'), ', 'date_added' => 'now()']); $OSCOM_Db->save('configuration', ['configuration_title' => 'Short Name', 'configuration_key' => 'MODULE_HEADER_TAGS_OPENSEARCH_SITE_SHORT_NAME', 'configuration_value' => STORE_NAME, 'configuration_description' => 'Short name to describe the search engine.', 'configuration_group_id' => '6', 'sort_order' => '0', 'date_added' => 'now()']); $OSCOM_Db->save('configuration', ['configuration_title' => 'Description', 'configuration_key' => 'MODULE_HEADER_TAGS_OPENSEARCH_SITE_DESCRIPTION', 'configuration_value' => 'Search ' . STORE_NAME, 'configuration_description' => 'Description of the search engine.', 'configuration_group_id' => '6', 'sort_order' => '0', 'date_added' => 'now()']); $OSCOM_Db->save('configuration', ['configuration_title' => 'Contact', 'configuration_key' => 'MODULE_HEADER_TAGS_OPENSEARCH_SITE_CONTACT', 'configuration_value' => STORE_OWNER_EMAIL_ADDRESS, 'configuration_description' => 'E-Mail address of the search engine maintainer. (optional)', 'configuration_group_id' => '6', 'sort_order' => '0', 'date_added' => 'now()']); $OSCOM_Db->save('configuration', ['configuration_title' => 'Tags', 'configuration_key' => 'MODULE_HEADER_TAGS_OPENSEARCH_SITE_TAGS', 'configuration_value' => '', 'configuration_description' => 'Keywords to identify and categorize the search content, separated by an empty space. (optional)', 'configuration_group_id' => '6', 'sort_order' => '0', 'date_added' => 'now()']); $OSCOM_Db->save('configuration', ['configuration_title' => 'Attribution', 'configuration_key' => 'MODULE_HEADER_TAGS_OPENSEARCH_SITE_ATTRIBUTION', 'configuration_value' => 'Copyright (c) ' . STORE_NAME, 'configuration_description' => 'Attribution for the search content. (optional)', 'configuration_group_id' => '6', 'sort_order' => '0', 'date_added' => 'now()']); $OSCOM_Db->save('configuration', ['configuration_title' => 'Adult Content', 'configuration_key' => 'MODULE_HEADER_TAGS_OPENSEARCH_SITE_ADULT_CONTENT', 'configuration_value' => 'False', 'configuration_description' => 'Search content contains material suitable only for adults.', 'configuration_group_id' => '6', 'sort_order' => '1', 'set_function' => 'tep_cfg_select_option(array(\'True\', \'False\'), ', 'date_added' => 'now()']); $OSCOM_Db->save('configuration', ['configuration_title' => '16x16 Icon', 'configuration_key' => 'MODULE_HEADER_TAGS_OPENSEARCH_SITE_ICON', 'configuration_value' => OSCOM::linkImage('Shop/favicon.ico'), 'configuration_description' => 'A 16x16 sized icon (must be in .ico format, eg http://server/favicon.ico). (optional)', 'configuration_group_id' => '6', 'sort_order' => '0', 'date_added' => 'now()']); $OSCOM_Db->save('configuration', ['configuration_title' => '64x64 Image', 'configuration_key' => 'MODULE_HEADER_TAGS_OPENSEARCH_SITE_IMAGE', 'configuration_value' => '', 'configuration_description' => 'A 64x64 sized image (must be in .png format, eg http://server/images/logo.png). (optional)', 'configuration_group_id' => '6', 'sort_order' => '0', 'date_added' => 'now()']); $OSCOM_Db->save('configuration', ['configuration_title' => 'Sort Order', 'configuration_key' => 'MODULE_HEADER_TAGS_OPENSEARCH_SORT_ORDER', 'configuration_value' => '0', 'configuration_description' => 'Sort order of display. Lowest is displayed first.', 'configuration_group_id' => '6', 'sort_order' => '0', 'date_added' => 'now()']); }
function execute() { global $currencies, $oscTemplate; $OSCOM_Db = Registry::get('Db'); $OSCOM_Language = Registry::get('Language'); $reviews_box_contents = ''; $sql_query = 'select r.reviews_id from :table_reviews r, :table_reviews_description rd, :table_products p, :table_products_description pd where r.reviews_status = 1 and r.products_id = p.products_id and p.products_status = 1 and r.reviews_id = rd.reviews_id and rd.languages_id = :languages_id and p.products_id = pd.products_id and pd.language_id = rd.languages_id'; if (isset($_GET['products_id'])) { $sql_query .= ' and p.products_id = :products_id'; } $sql_query .= ' order by r.reviews_id desc limit ' . (int) MAX_RANDOM_SELECT_REVIEWS; $Qcheck = $OSCOM_Db->prepare($sql_query); $Qcheck->bindInt(':languages_id', $OSCOM_Language->getId()); if (isset($_GET['products_id'])) { $Qcheck->bindInt(':products_id', $_GET['products_id']); } $Qcheck->execute(); $result = $Qcheck->fetchAll(); if (count($result) > 0) { $result = $result[mt_rand(0, count($result) - 1)]; $Qreview = $OSCOM_Db->prepare('select r.reviews_id, r.reviews_rating, substring(rd.reviews_text, 1, 60) as reviews_text, p.products_id, p.products_image, pd.products_name from :table_reviews r, :table_reviews_description rd, :table_products p, :table_products_description pd where r.reviews_id = :reviews_id and r.reviews_id = rd.reviews_id and rd.languages_id = :languages_id and r.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = rd.languages_id'); $Qreview->bindInt(':reviews_id', $result['reviews_id']); $Qreview->bindInt(':languages_id', $OSCOM_Language->getId()); $Qreview->execute(); if ($Qreview->fetch() !== false) { // display random review box $rand_review_text = tep_break_string($Qreview->valueProtected('reviews_text'), 15, '-<br />'); $reviews_box_contents = '<div class="text-center"><a href="' . OSCOM::link('product_reviews.php', 'products_id=' . $Qreview->valueInt('products_id')) . '">' . HTML::image(OSCOM::linkImage($Qreview->value('products_image')), $Qreview->value('products_name'), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div><div><a href="' . OSCOM::link('product_reviews.php', 'products_id=' . $Qreview->valueInt('products_id')) . '">' . $rand_review_text . '</a>...</div><div class="text-center" title="' . OSCOM::getDef('module_boxes_reviews_box_text_of_5_stars', ['reviews_rating' => $Qreview->valueInt('reviews_rating')]) . '">' . HTML::stars($Qreview->valueInt('reviews_rating')) . '</div>'; } } elseif (isset($_GET['products_id'])) { // display 'write a review' box $reviews_box_contents = '<span class="fa fa-thumbs-up"></span> <a href="' . OSCOM::link('product_reviews_write.php', 'products_id=' . (int) $_GET['products_id']) . '">' . OSCOM::getDef('module_boxes_reviews_box_write_review') . '</a>'; } else { // display 'no reviews' box $reviews_box_contents = '<p>' . OSCOM::getDef('module_boxes_reviews_box_no_reviews') . '</p>'; } ob_start(); include 'includes/modules/boxes/templates/reviews.php'; $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); }
function getOutput() { $current_version = OSCOM::getVersion(); $new_version = false; $VersionCache = new Cache('core_version_check'); if ($VersionCache->exists()) { $date_last_checked = DateTime::toShort(date('Y-m-d H:i:s', $VersionCache->getTime()), true); $releases = $VersionCache->get(); foreach ($releases as $version) { $version_array = explode('|', $version); if (version_compare($current_version, $version_array[0], '<')) { $new_version = true; break; } } } else { $date_last_checked = OSCOM::getDef('module_admin_dashboard_version_check_never'); } $output = '<table class="table table-hover"> <thead> <tr class="info"> <th>' . OSCOM::getDef('module_admin_dashboard_version_check_title') . '</th> <th class="text-right">' . OSCOM::getDef('module_admin_dashboard_version_check_date') . '</th> </tr> </thead> <tbody>'; if ($new_version == true) { $output .= ' <tr class="success"> <td colspan="2">' . HTML::image(OSCOM::linkImage('icons/warning.gif'), OSCOM::getDef('icon_warning')) . ' <strong>' . OSCOM::getDef('module_admin_dashboard_version_check_update_available') . '</strong></td> </tr>'; } $output .= ' <tr> <td><a href="' . OSCOM::link('online_update.php') . '">' . OSCOM::getDef('module_admin_dashboard_version_check_check_now') . '</a></td> <td class="text-right">' . $date_last_checked . '</td> </tr> </tbody> </table>'; return $output; }
function execute() { global $PHP_SELF, $oscTemplate; $OSCOM_Db = Registry::get('Db'); $OSCOM_Language = Registry::get('Language'); if ($PHP_SELF == 'product_info.php' && isset($_GET['products_id'])) { $Qproduct = $OSCOM_Db->prepare('select p.products_id, pd.products_name, pd.products_description, p.products_image from :table_products p, :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'); $Qproduct->bindInt(':products_id', $_GET['products_id']); $Qproduct->bindInt(':language_id', $OSCOM_Language->getId()); $Qproduct->execute(); if ($Qproduct->fetch() !== false) { $data = array('card' => MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TYPE, 'title' => $Qproduct->value('products_name')); if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID)) { $data['site'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID; } if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID)) { $data['creator'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID; } $product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($Qproduct->value('products_description')))), 0, 197); if (strlen($product_description) == 197) { $product_description .= ' ..'; } $data['description'] = $product_description; $products_image = $Qproduct->value('products_image'); $Qimage = $OSCOM_Db->get('products_images', 'image', ['products_id' => $Qproduct->valueInt('products_id')], 'sort_order', 1); if ($Qimage->fetch() !== false) { $products_image = $Qimage->value('image'); } $data['image'] = OSCOM::linkImage($products_image); $result = ''; foreach ($data as $key => $value) { $result .= '<meta name="twitter:' . HTML::outputProtected($key) . '" content="' . HTML::outputProtected($value) . '" />' . "\n"; } $oscTemplate->addBlock($result, $this->group); } } }
function tep_display_banner($action, $identifier) { $OSCOM_Db = Registry::get('Db'); $banner = null; if ($action == 'dynamic') { $Qcheck = $OSCOM_Db->prepare('select banners_id from :table_banners where banners_group = :banners_group and status = 1 limit 1'); $Qcheck->bindValue(':banners_group', $identifier); $Qcheck->execute(); if ($Qcheck->fetch() !== false) { $Qbanner = $OSCOM_Db->prepare('select banners_id, banners_title, banners_image, banners_html_text from :table_banners where banners_group = :banners_group and status = 1 order by rand() limit 1'); $Qbanner->bindValue(':banners_group', $identifier); $Qbanner->execute(); $banner = $Qbanner->fetch(); } } elseif ($action == 'static') { if (is_array($identifier)) { $banner = $identifier; } else { $Qbanner = $OSCOM_Db->prepare('select banners_id, banners_title, banners_image, banners_html_text from :table_banners where banners_id = :banners_id and status = 1'); $Qbanner->bindInt(':banners_id', $identifier); $Qbanner->execute(); if ($Qbanner->fetch() !== false) { $banner = $Qbanner->toArray(); } } } $output = ''; if (isset($banner)) { if (!empty($banner['banners_html_text'])) { $output = $banner['banners_html_text']; } else { $output = '<a href="' . OSCOM::link('redirect.php', 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . HTML::image(OSCOM::linkImage($banner['banners_image']), $banner['banners_title']) . '</a>'; } tep_update_banner_display_count($banner['banners_id']); } return $output; }
function getOutput() { global $oscTemplate; $OSCOM_Db = Registry::get('Db'); // add the js in the footer $oscTemplate->addBlock('<script src="//assets.pinterest.com/js/pinit.js"></script>', 'footer_scripts'); $params = array(); // grab the product name (used for description) $params['description'] = tep_get_products_name($_GET['products_id']); // and image (used for media) $Qimage = $OSCOM_Db->get('products', 'products_image', ['products_id' => (int) $_GET['products_id']]); if (!empty($Qimage->value('products_image'))) { $image_file = $Qimage->value('products_image'); $Qimage = $OSCOM_Db->get('products_images', 'image', ['products_id' => (int) $_GET['products_id']], 'sort_order'); if ($Qimage->fetch() !== false) { do { if (!empty($Qimage->value('image'))) { $image_file = $Qimage->value('image'); // overwrite image with first multiple product image break; } } while ($Qimage->fetch()); } $params['media'] = OSCOM::linkImage($image_file); } // url $params['url'] = OSCOM::link('product_info.php', 'products_id=' . $_GET['products_id'], false); $output = '<a href="http://pinterest.com/pin/create/button/?'; foreach ($params as $key => $value) { $output .= $key . '=' . urlencode($value) . '&'; } $output = substr($output, 0, -1); //remove last & from the url $output .= '" class="pin-it-button" count-layout="' . strtolower(MODULE_SOCIAL_BOOKMARKS_PINTEREST_BUTTON_COUNT_POSITION) . '"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="' . $this->public_title . '" /></a>'; return $output; }
echo HTML::image(OSCOM::linkImage($image['image']), '', '', '', 'id="piGalImg_' . $pi_counter . '"') . "\n"; } ?> </div> <?php if (!empty($pi_html)) { echo ' <div style="display: none;">' . implode('', $pi_html) . '</div>'; } } else { ?> <div class="piGal pull-right"> <?php echo HTML::image(OSCOM::linkImage($Qproduct->value('products_image')), $Qproduct->value('products_name')); ?> </div> <?php } } ?> <div itemprop="description"> <?php echo $Qproduct->value('products_description'); ?> </div> <?php
echo date('H:i:s', $Qonline->value('time_last_click')); ?> </td> <td class="dataTableContent"><?php if (preg_match('/^(.*)osCsid=[A-Z0-9,-]+[&]*(.*)/i', $Qonline->value('last_page_url'), $array)) { echo $array[1] . $array[2]; } else { echo $Qonline->value('last_page_url'); } ?> </td> <td class="dataTableContent" align="right"><?php if (isset($info) && is_object($info) && $Qonline->value('session_id') == $info->session_id) { echo HTML::image(OSCOM::linkImage('icon_arrow_right.gif'), ''); } else { echo '<a href="' . OSCOM::link(FILENAME_WHOS_ONLINE, 'page=' . $_GET['page'] . '&info=' . $Qonline->value('session_id')) . '">' . HTML::image(OSCOM::linkImage('icon_info.gif'), OSCOM::getDef('image_icon_info')) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="9"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $Qonline->getPageSetLabel(OSCOM::getDef('text_display_number_of_customers')); ?> </td> <td class="smallText" align="right"><?php
</div> <?php } ?> <div class="clearfix"></div> </div> <?php $prod_list_contents = NULL; while ($Qlisting->fetch()) { $prod_list_contents .= '<div class="item list-group-item col-sm-4" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product">'; $prod_list_contents .= ' <div class="productHolder equal-height">'; if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) { $prod_list_contents .= ' <a href="' . OSCOM::link('product_info.php', 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $Qlisting->valueInt('products_id')) . '">' . HTML::image(OSCOM::linkImage($Qlisting->value('products_image')), $Qlisting->value('products_name'), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'itemprop="image"', NULL, 'img-responsive thumbnail group list-group-image') . '</a>'; } else { $prod_list_contents .= ' <a href="' . OSCOM::link('product_info.php', ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $Qlisting->valueInt('products_id')) . '">' . HTML::image(OSCOM::linkImage($Qlisting->value('products_image')), $Qlisting->value('products_name'), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'itemprop="image"', NULL, 'img-responsive thumbnail group list-group-image') . '</a>'; } $prod_list_contents .= ' <div class="caption">'; $prod_list_contents .= ' <h2 class="group inner list-group-item-heading">'; if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) { $prod_list_contents .= ' <a itemprop="url" href="' . OSCOM::link('product_info.php', 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $Qlisting->valueInt('products_id')) . '"><span itemprop="name">' . $Qlisting->value('products_name') . '</span></a>'; } else { $prod_list_contents .= ' <a itemprop="url" href="' . OSCOM::link('product_info.php', ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $Qlisting->valueInt('products_id')) . '"><span itemprop="name">' . $Qlisting->value('products_name') . '</span></a>'; } $prod_list_contents .= ' </h2>'; $prod_list_contents .= ' <p class="group inner list-group-item-text" itemprop="description">' . strip_tags($Qlisting->value('products_description'), '<br>') . '…</p><div class="clearfix"></div>'; $extra_list_contents = NULL; if (PRODUCT_LIST_MANUFACTURER > 0 && tep_not_null($Qlisting->valueInt('manufacturers_id'))) { $extra_list_contents .= '<dt>' . OSCOM::getDef('table_heading_manufacturer') . '</dt>'; $extra_list_contents .= '<dd><a href="' . OSCOM::link('index.php', 'manufacturers_id=' . $Qlisting->valueInt('manufacturers_id')) . '">' . $Qlisting->value('manufacturers_name') . '</a></dd>'; }
echo OSCOM::linkPublic('Templates/Sail/css/stylesheet.css'); ?> "> </head> <body> <!-- body_text //--> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo STORE_NAME . '<br>' . nl2br(STORE_ADDRESS) . '<br>' . STORE_PHONE; ?> </td> <td class="pageHeading" align="right"><?php echo HTML::image(OSCOM::linkImage('Shop/' . STORE_LOGO), STORE_NAME); ?> </td> </tr> </table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><strong><?php echo OSCOM::getDef('entry_sold_to'); ?> </strong></td> </tr>
<?php use OSC\OM\HTML; use OSC\OM\OSCOM; ?> <div id="storeLogo" class="col-sm-<?php echo $content_width; ?> storeLogo"> <?php echo '<a href="' . OSCOM::link('index.php') . '">' . HTML::image(OSCOM::linkImage(STORE_LOGO), STORE_NAME) . '</a>'; ?> </div>
echo $Qrates->value('tax_class_title'); ?> </td> <td class="dataTableContent"><?php echo $Qrates->value('geo_zone_name'); ?> </td> <td class="dataTableContent"><?php echo tep_display_tax_value($Qrates->value('tax_rate')); ?> %</td> <td class="dataTableContent" align="right"><?php if (isset($trInfo) && is_object($trInfo) && $Qrates->valueInt('tax_rates_id') === (int) $trInfo->tax_rates_id) { echo HTML::image(OSCOM::linkImage('icon_arrow_right.gif'), ''); } else { echo '<a href="' . OSCOM::link(FILENAME_TAX_RATES, 'page=' . $_GET['page'] . '&tID=' . $Qrates->valueInt('tax_rates_id')) . '">' . HTML::image(OSCOM::linkImage('icon_info.gif'), OSCOM::getDef('image_icon_info')) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $Qrates->getPageSetLabel(OSCOM::getDef('text_display_number_of_tax_rates')); ?> </td> <td class="smallText" align="right"><?php
function getOutput() { return '<a href="http://twitter.com/home?status=' . urlencode(OSCOM::link('product_info.php', 'products_id=' . $_GET['products_id'], false)) . '" target="_blank"><img src="' . OSCOM::linkImage('social_bookmarks/' . $this->icon) . '" border="0" title="' . HTML::outputProtected($this->public_title) . '" alt="' . HTML::outputProtected($this->public_title) . '" /></a>'; }
echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . OSCOM::link(FILENAME_PRODUCTS_EXPECTED, 'page=' . $_GET['page'] . '&pID=' . $Qproducts->valueInt('products_id')) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $Qproducts->value('products_name'); ?> </td> <td class="dataTableContent" align="center"><?php echo DateTime::toShort($Qproducts->value('products_date_available')); ?> </td> <td class="dataTableContent" align="right"><?php if (isset($pInfo) && is_object($pInfo) && $Qproducts->valueInt('products_id') === (int) $pInfo->products_id) { echo HTML::image(OSCOM::linkImage('icon_arrow_right.gif')); } else { echo '<a href="' . OSCOM::link(FILENAME_PRODUCTS_EXPECTED, 'page=' . $_GET['page'] . '&pID=' . $Qproducts->valueInt('products_id')) . '">' . HTML::image(OSCOM::linkImage('icon_info.gif'), OSCOM::getDef('image_icon_info')) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $Qproducts->getPageSetLabel(OSCOM::getDef('text_display_number_of_products_expected')); ?> </td> <td class="smallText" align="right"><?php
} if (isset($zInfo) && is_object($zInfo) && $Qzones->valueInt('geo_zone_id') === (int) $zInfo->geo_zone_id) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $zInfo->geo_zone_id . '&action=list') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $Qzones->valueInt('geo_zone_id')) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo '<a href="' . OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $Qzones->valueInt('geo_zone_id') . '&action=list') . '">' . HTML::image(OSCOM::linkImage('icons/folder.gif'), OSCOM::getDef('icon_folder')) . '</a> ' . $Qzones->value('geo_zone_name'); ?> </td> <td class="dataTableContent" align="right"><?php if (isset($zInfo) && is_object($zInfo) && $Qzones->valueInt('geo_zone_id') === (int) $zInfo->geo_zone_id) { echo HTML::image(OSCOM::linkImage('icon_arrow_right.gif')); } else { echo '<a href="' . OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $Qzones->valueInt('geo_zone_id')) . '">' . HTML::image(OSCOM::linkImage('icon_info.gif'), OSCOM::getDef('image_icon_info')) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $Qzones->getPageSetLabel(OSCOM::getDef('text_display_number_of_tax_zones')); ?> </td> <td class="smallText" align="right"><?php
echo $Qcountries->value('countries_name'); ?> </td> <td class="dataTableContent" align="center" width="40"><?php echo $Qcountries->value('countries_iso_code_2'); ?> </td> <td class="dataTableContent" align="center" width="40"><?php echo $Qcountries->value('countries_iso_code_3'); ?> </td> <td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && $Qcountries->valueInt('countries_id') === (int) $cInfo->countries_id) { echo HTML::image(OSCOM::linkImage('icon_arrow_right.gif'), ''); } else { echo '<a href="' . OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $Qcountries->valueInt('countries_id')) . '">' . HTML::image(OSCOM::linkImage('icon_info.gif'), OSCOM::getDef('image_icon_info')) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="4"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $Qcountries->getPageSetLabel(OSCOM::getDef('text_display_number_of_countries')); ?> </td> <td class="smallText" align="right"><?php
<?php use OSC\OM\HTML; use OSC\OM\OSCOM; ?> <div class="panel panel-default"> <div class="panel-heading"><a href="<?php echo OSCOM::link('products_new.php'); ?> "><?php echo OSCOM::getDef('module_boxes_whats_new_box_title'); ?> </a></div> <div class="panel-body text-center"> <?php echo '<a href="' . OSCOM::link('product_info.php', 'products_id=' . (int) $random_product['products_id']) . '">' . HTML::image(OSCOM::linkImage($random_product['products_image']), $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . OSCOM::link('product_info.php', 'products_id=' . (int) $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br />' . $whats_new_price . '</div>'; ?> </div>
echo ' <td class="dataTableContent">' . $Qstatus->value('orders_status_name') . '</td>' . "\n"; } ?> <td class="dataTableContent" align="center"><?php echo HTML::image(OSCOM::linkImage('icons/' . ($Qstatus->valueInt('public_flag') === 1 ? 'tick.gif' : 'cross.gif'))); ?> </td> <td class="dataTableContent" align="center"><?php echo HTML::image(OSCOM::linkImage('icons/' . ($Qstatus->valueInt('downloads_flag') === 1 ? 'tick.gif' : 'cross.gif'))); ?> </td> <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && $Qstatus->valueInt('orders_status_id') === (int) $oInfo->orders_status_id) { echo HTML::image(OSCOM::linkImage('icon_arrow_right.gif'), ''); } else { echo '<a href="' . OSCOM::link(FILENAME_ORDERS_STATUS, 'page=' . $_GET['page'] . '&oID=' . $Qstatus->valueInt('orders_status_id')) . '">' . HTML::image(OSCOM::linkImage('icon_info.gif'), OSCOM::getDef('image_icon_info')) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="4"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $Qstatus->getPageSetLabel(OSCOM::getDef('text_display_number_of_orders_status')); ?> </td> <td class="smallText" align="right"><?php
echo (int) $num_new_products; ?> " /> <?php foreach ($new_products as $product) { ?> <div class="col-sm-<?php echo $product_width; ?> " itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product"> <div class="thumbnail equal-height"> <a href="<?php echo OSCOM::link('product_info.php', 'products_id=' . (int) $product['products_id']); ?> "><?php echo HTML::image(OSCOM::linkImage($product['products_image']), $product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'itemprop="image"'); ?> </a> <div class="caption"> <p class="text-center"><a itemprop="url" href="<?php echo OSCOM::link('product_info.php', 'products_id=' . (int) $product['products_id']); ?> "><span itemprop="name"><?php echo $product['products_name']; ?> </span></a></p> <hr> <p class="text-center" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="<?php echo HTML::output($_SESSION['currency']); ?> " /><span itemprop="price" content="<?php
} if (DEFAULT_LANGUAGE == $Qlanguages->value('code')) { echo ' <td class="dataTableContent"><strong>' . $Qlanguages->value('name') . ' (' . OSCOM::getDef('text_default') . ')</strong></td>' . "\n"; } else { echo ' <td class="dataTableContent">' . $Qlanguages->value('name') . '</td>' . "\n"; } ?> <td class="dataTableContent"><?php echo $Qlanguages->value('code'); ?> </td> <td class="dataTableContent" align="right"><?php if (isset($lInfo) && is_object($lInfo) && $Qlanguages->valueInt('languages_id') == (int) $lInfo->languages_id) { echo HTML::image(OSCOM::linkImage('icon_arrow_right.gif')); } else { echo '<a href="' . OSCOM::link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $Qlanguages->valueInt('languages_id')) . '">' . HTML::image(OSCOM::linkImage('icon_info.gif'), OSCOM::getDef('image_icon_info')) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $Qlanguages->getPageSetLabel(OSCOM::getDef('text_display_number_of_languages')); ?> </td> <td class="smallText" align="right"><?php
echo OSCOM::getDef('table_heading_module'); ?> </td> <td class="dataTableHeadingContent"><?php echo OSCOM::getDef('table_heading_info'); ?> </td> <td class="dataTableHeadingContent" width="20" align="right"> </td> </tr> <?php foreach ($modules as $module) { $secCheck = $GLOBALS[$module['class']]; if (!in_array($secCheck->type, $types)) { $secCheck->type = 'info'; } $output = ''; if ($secCheck->pass()) { $secCheck->type = 'success'; } else { $output = $secCheck->getMessage(); } echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "\n" . ' <td class="dataTableContent" align="center" valign="top">' . HTML::image(OSCOM::linkImage('ms_' . $secCheck->type . '.png'), '', 16, 16) . '</td>' . "\n" . ' <td class="dataTableContent" valign="top" style="white-space: nowrap;">' . HTML::outputProtected($module['title']) . '</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . HTML::outputProtected($module['code']) . '</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $output . '</td>' . "\n" . ' <td class="dataTableContent" align="center" valign="top">' . (isset($secCheck->has_doc) && $secCheck->has_doc ? '<a href="http://library.oscommerce.com/Wiki&oscom_2_3&security_checks&' . $module['code'] . '" target="_blank">' . HTML::image(OSCOM::linkImage('icons/preview.gif')) . '</a>' : '') . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table> <?php require $oscTemplate->getFile('template_bottom.php'); require 'includes/application_bottom.php';
} } $OSCOM_Db->delete('banners', ['banners_id' => (int) $banners_id]); $OSCOM_Db->delete('banners_history', ['banners_id' => (int) $banners_id]); $OSCOM_MessageStack->add(OSCOM::getDef('success_banner_removed'), 'success'); OSCOM::redirect(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page']); break; case 'preview': $banners_id = HTML::sanitize($_GET['banner']); $Qbanner = $OSCOM_Db->get('banners', ['banners_title', 'banners_image', 'banners_html_text'], ['banners_id' => (int) $banners_id]); if ($Qbanner->check()) { echo '<h1>' . $Qbanner->valueProtected('banners_title') . '</h1>'; if (tep_not_null($Qbanner->value('banners_html_text'))) { echo $Qbanner->value('banners_html_text'); } elseif (tep_not_null($Qbanner->value('banners_image'))) { echo HTML::image(OSCOM::linkImage('Shop/' . $Qbanner->value('banners_image')), $Qbanner->value('banners_title')); } exit; } break; } } $show_listing = true; require $oscTemplate->getFile('template_top.php'); if (empty($action)) { ?> <div class="pull-right"> <?php echo HTML::button(OSCOM::getDef('image_new_banner'), 'fa fa-plus', OSCOM::link('banner_manager.php', 'action=new'), null, 'btn-info'); ?>
$keys .= tep_call_function($class_method[1], $value['value'], ${$class_method[0]}); } else { $keys .= tep_call_function($use_function, $value['value']); } } else { $keys .= $value['value']; } $keys .= '<br /><br />'; } $keys = substr($keys, 0, strrpos($keys, '<br /><br />')); $contents[] = array('align' => 'center', 'text' => HTML::button(OSCOM::getDef('image_edit'), 'fa fa-edit', OSCOM::link('modules_content.php', 'module=' . $mInfo->code . '&action=edit')) . HTML::button(OSCOM::getDef('image_module_remove'), 'fa fa-minus', OSCOM::link('modules_content.php', 'module=' . $mInfo->code . '&action=remove'))); if (isset($mInfo->signature) && (list($scode, $smodule, $sversion, $soscversion) = explode('|', $mInfo->signature))) { $contents[] = array('text' => '<br />' . HTML::image(OSCOM::linkImage('icon_info.gif'), OSCOM::getDef('image_icon_info')) . ' <strong>' . OSCOM::getDef('text_info_version') . '</strong> ' . $sversion . ' (<a href="http://sig.oscommerce.com/' . $mInfo->signature . '" target="_blank">' . OSCOM::getDef('text_info_online_status') . '</a>)'); } if (isset($mInfo->api_version)) { $contents[] = array('text' => HTML::image(OSCOM::linkImage('icon_info.gif'), OSCOM::getDef('image_icon_info')) . ' <strong>' . OSCOM::getDef('text_info_api_version') . '</strong> ' . $mInfo->api_version); } $contents[] = array('text' => '<br />' . $mInfo->description); $contents[] = array('text' => '<br />' . $keys); } } break; } if (tep_not_null($heading) && tep_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr>
$contents = array('form' => HTML::form('reviews', OSCOM::link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=deleteconfirm'))); $contents[] = array('text' => OSCOM::getDef('text_info_delete_review_intro')); $contents[] = array('text' => '<br /><strong>' . $rInfo->products_name . '</strong>'); $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id))); break; default: if (isset($rInfo) && is_object($rInfo)) { $heading[] = array('text' => '<strong>' . $rInfo->products_name . '</strong>'); $contents[] = array('align' => 'center', 'text' => HTML::button(OSCOM::getDef('image_edit'), 'fa fa-edit', OSCOM::link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=edit')) . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', OSCOM::link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=delete'))); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_date_added') . ' ' . DateTime::toShort($rInfo->date_added)); if (tep_not_null($rInfo->last_modified)) { $contents[] = array('text' => OSCOM::getDef('text_info_last_modified') . ' ' . DateTime::toShort($rInfo->last_modified)); } $contents[] = array('text' => '<br />' . tep_info_image($rInfo->products_image, $rInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT)); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_review_author') . ' ' . $rInfo->customers_name); $contents[] = array('text' => OSCOM::getDef('text_info_review_rating') . ' ' . HTML::image(OSCOM::linkImage('Shop/stars_' . $rInfo->reviews_rating . '.gif'))); $contents[] = array('text' => OSCOM::getDef('text_info_review_read') . ' ' . $rInfo->reviews_read); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_review_size') . ' ' . $rInfo->reviews_text_size . ' bytes'); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_products_average_rating') . ' ' . number_format($rInfo->average_rating, 2) . '%'); } break; } if (tep_not_null($heading) && tep_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td>
</span> <span class="pull-right"><?php echo OSCOM::getDef('text_result_page'); ?> </span> </div> </div> <?php } ?> <div class="contentText"> <div class="reviews"> <?php while ($Qreviews->fetch()) { echo '<blockquote class="col-sm-6">'; echo ' <p><span class="pull-left">' . HTML::image(OSCOM::linkImage($Qreviews->value('products_image')), $Qreviews->value('products_name'), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</span>' . $Qreviews->valueProtected('reviews_text') . ' ... </p><div class="clearfix"></div>'; $review_name = $Qreviews->valueProtected('customers_name'); echo '<footer>'; $review_name = $Qreviews->valueProtected('customers_name'); echo OSCOM::getDef('reviews_text_rated', ['reviews_rating' => HTML::stars($Qreviews->value('reviews_rating')), 'review_name' => $review_name]); echo '<a href="' . OSCOM::link('product_reviews.php', 'products_id=' . $Qreviews->valueInt('products_id')) . '">'; echo '<span class="pull-right label label-info">' . OSCOM::getDef('reviews_text_read_more') . '</span>'; echo '</a>'; echo '</footer>'; echo '</blockquote>'; } ?> </div> <div class="clearfix"></div> </div> <?php
use OSC\OM\HTML; use OSC\OM\OSCOM; ?> <div class="col-sm-<?php echo $content_width; ?> category-listing"> <div itemscope itemtype="http://schema.org/ItemList"> <meta itemprop="itemListOrder" content="http://schema.org/ItemListUnordered" /> <meta itemprop="name" content="<?php echo $category['categories_name']; ?> " /> <?php foreach ($categories as $c) { $cPath_new = tep_get_path($c['categories_id']); echo '<div class="col-sm-' . $category_width . '">'; echo ' <div class="text-center">'; echo ' <a href="' . OSCOM::link('index.php', $cPath_new) . '">' . HTML::image(OSCOM::linkImage($c['categories_image']), $c['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>'; echo ' <div class="caption text-center">'; echo ' <h5><a href="' . OSCOM::link('index.php', $cPath_new) . '"><span itemprop="itemListElement">' . $c['categories_name'] . '</span></a></h5>'; echo ' </div>'; echo ' </div>'; echo '</div>'; } ?> </div> </div>