function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; if (MODULE_SHIPPING_TABLE_MODE == 'price') { $order_total = $this->getShippableTotal(); } else { $order_total = $shipping_weight; } $table_cost = preg_split("/[:,]/", MODULE_SHIPPING_TABLE_COST); $size = sizeof($table_cost); for ($i = 0, $n = $size; $i < $n; $i += 2) { if ($order_total <= $table_cost[$i]) { $shipping = $table_cost[$i + 1]; break; } } if (MODULE_SHIPPING_TABLE_MODE == 'weight') { $shipping = $shipping * $shipping_num_boxes; } $this->quotes = array('id' => $this->code, 'module' => OSCOM::getDef('module_shipping_table_text_title'), 'methods' => array(array('id' => $this->code, 'title' => OSCOM::getDef('module_shipping_table_text_way'), 'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING))); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) { $this->quotes['icon'] = HTML::image($this->icon, $this->title); } return $this->quotes; }
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 function getImage($language_code, $width = null, $height = null) { if (!isset($width) || !is_int($width)) { $width = 16; } if (!isset($height) || !is_int($height)) { $height = 12; } return HTML::image(OSCOM::link('Shop/public/third_party/flag-icon-css/flags/4x3/' . $this->get('image', $language_code) . '.svg', null, false), $this->get('name', $language_code), $width, $height); }
function quote($method = '') { global $order; $this->quotes = array('id' => $this->code, 'module' => OSCOM::getDef('module_shipping_flat_text_title'), 'methods' => array(array('id' => $this->code, 'title' => OSCOM::getDef('module_shipping_flat_text_way'), 'cost' => MODULE_SHIPPING_FLAT_COST))); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) { $this->quotes['icon'] = HTML::image($this->icon, $this->title); } return $this->quotes; }
function quote($method = '') { global $order; $number_of_items = $this->getNumberOfItems(); $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_ITEM_TEXT_WAY, 'cost' => MODULE_SHIPPING_ITEM_COST * $number_of_items + MODULE_SHIPPING_ITEM_HANDLING))); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) { $this->quotes['icon'] = HTML::image($this->icon, $this->title); } return $this->quotes; }
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 execute() { global $PHP_SELF, $lng, $request_type, $oscTemplate; if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { if (!isset($lng) || isset($lng) && !is_object($lng)) { $lng = new language(); } if (count($lng->catalog_languages) > 1) { $languages_string = ''; foreach ($lng->catalog_languages as $key => $value) { $languages_string .= ' <a href="' . OSCOM::link($PHP_SELF, tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . HTML::image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name'], NULL, NULL, NULL, false) . '</a> '; } ob_start(); include 'includes/modules/boxes/templates/languages.php'; $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } } }
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 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(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>'; } tep_update_banner_display_count($banner['banners_id']); } return $output; }
function execute() { global $oscTemplate; $OSCOM_Db = Registry::get('Db'); 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', $_SESSION['languages_id']); $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 class="center-block">' . HTML::image(DIR_WS_IMAGES . $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">' . sprintf(MODULE_BOXES_MANUFACTURER_INFO_BOX_HOMEPAGE, $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); } } }
} ?> <?php echo HTML::form('product_reviews_write', OSCOM::link('product_reviews_write.php', 'action=process&products_id=' . $Qcheck->valueInt('products_id')), 'post', 'class="form-horizontal" role="form"', ['tokenize' => true]); ?> <div class="contentContainer"> <?php if (!empty($Qcheck->value('products_image'))) { ?> <div class="col-sm-4 text-center pull-right"> <?php echo '<a href="' . OSCOM::link('product_info.php', 'products_id=' . $Qcheck->valueInt('products_id')) . '">' . HTML::image(DIR_WS_IMAGES . $Qcheck->value('products_image'), $Qcheck->value('products_name'), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?> <p><?php echo HTML::button(IMAGE_BUTTON_IN_CART, 'glyphicon glyphicon-shopping-cart', OSCOM::link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now'), null, null, 'btn-success btn-block'); ?> </p> </div> <div class="clearfix"></div> <hr> <div class="clearfix"></div> <?php
function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; $dest_country = $order->delivery['country']['iso_code_2']; $dest_zone = 0; $error = false; for ($i = 1; $i <= $this->num_zones; $i++) { $countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i); $country_zones = preg_split("/[,]/", $countries_table); if (in_array($dest_country, $country_zones)) { $dest_zone = $i; break; } } if ($dest_zone == 0) { $error = true; } else { $shipping = -1; $zones_cost = constant('MODULE_SHIPPING_ZONES_COST_' . $dest_zone); $zones_table = preg_split("/[:,]/", $zones_cost); $size = sizeof($zones_table); for ($i = 0; $i < $size; $i += 2) { if ($shipping_weight <= $zones_table[$i]) { $shipping = $zones_table[$i + 1]; $shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $dest_country . ' : ' . $shipping_weight . ' ' . MODULE_SHIPPING_ZONES_TEXT_UNITS; break; } } if ($shipping == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_ZONES_UNDEFINED_RATE; } else { $shipping_cost = $shipping * $shipping_num_boxes + constant('MODULE_SHIPPING_ZONES_HANDLING_' . $dest_zone); } } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_ZONES_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost))); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) { $this->quotes['icon'] = HTML::image($this->icon, $this->title); } if ($error == true) { $this->quotes['error'] = MODULE_SHIPPING_ZONES_INVALID_ZONE; } return $this->quotes; }
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
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 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>
</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>'; }
$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>
$products[$i][$option]['options_values_id'] = $value; $products[$i][$option]['products_options_values_name'] = $Qattributes->value('products_options_values_name'); $products[$i][$option]['options_values_price'] = $Qattributes->value('options_values_price'); $products[$i][$option]['price_prefix'] = $Qattributes->value('price_prefix'); } } } ?> <table class="table table-striped table-condensed"> <tbody> <?php $products_name = NULL; for ($i = 0, $n = sizeof($products); $i < $n; $i++) { $products_name .= '<tr>'; $products_name .= ' <td valign="top" class="hidden-xs"><a href="' . OSCOM::link('product_info.php', 'products_id=' . $products[$i]['id']) . '">' . HTML::image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . ' <td valign="top"><a href="' . OSCOM::link('product_info.php', 'products_id=' . $products[$i]['id']) . '">' . $products[$i]['name'] . '</a>'; if (STOCK_CHECK == 'true') { $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']); if (tep_not_null($stock_check)) { $any_out_of_stock = 1; $products_name .= $stock_check; } } if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { foreach ($products[$i]['attributes'] as $option => $value) { $products_name .= '<br /><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>'; } } $products_name .= '<br>' . HTML::inputField('cart_quantity[]', $products[$i]['quantity'], 'style="width: 65px; display: inline;" min="0"', 'number') . HTML::hiddenField('products_id[]', $products[$i]['id']) . ' ' . HTML::button(NULL, 'glyphicon glyphicon-refresh', NULL, NULL, NULL, 'btn-info btn-sm') . ' ' . HTML::button(NULL, 'glyphicon glyphicon-remove', OSCOM::link('shopping_cart.php', 'products_id=' . $products[$i]['id'] . '&action=remove_product'), NULL, NULL, 'btn-danger btn-sm'); $products_name .= '</td>'; $products_name .= ' <td class="text-right" valign="top">' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</td>' . '</tr>';
} 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
<?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 ' ' . HTML::image(DIR_WS_IMAGES . $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(DIR_WS_IMAGES . $Qproduct->value('products_image'), $Qproduct->value('products_name')); ?> </div> <?php } } ?> <div itemprop="description"> <?php echo $Qproduct->value('products_description'); ?> </div> <?php
$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>
} else { $deepest_category_id = $category_links[$i]; break; // we've found the deepest category the customer is in } } } $Qcategories = $OSCOM_Db->prepare('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id order by sort_order, cd.categories_name'); $Qcategories->bindInt(':parent_id', $deepest_category_id); $Qcategories->bindInt(':language_id', $_SESSION['languages_id']); $Qcategories->execute(); while ($Qcategories->fetch()) { $cPath_new = tep_get_path($Qcategories->valueInt('categories_id')); echo '<div class="col-xs-6 col-sm-4">'; echo ' <div class="text-center">'; echo ' <a href="' . OSCOM::link('index.php', $cPath_new) . '">' . HTML::image(DIR_WS_IMAGES . $Qcategories->value('categories_image'), $Qcategories->value('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) . '">' . $Qcategories->value('categories_name') . '</a></h5>'; echo ' </div>'; echo ' </div>'; echo '</div>'; } // needed for the new products module shown below $new_products_category_id = $current_category_id; ?> </div> <div class="clearfix"></div> <?php include 'includes/modules/new_products.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
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';
<?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 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(DIR_WS_IMAGES . $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 $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
} } $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'); ?>