public function getIcon($size = 16, $icon = null, $title = null) { if (!isset($icon)) { $icon = $this->_application->getIcon(); } return HTML::image(OSCOM::getPublicSiteLink('images/applications/' . $size . '/' . $icon), $title, $size, $size); }
public function initialize() { $OSCOM_Product = Registry::exists('Product') ? Registry::get('Product') : null; $OSCOM_PDO = Registry::get('PDO'); $OSCOM_Language = Registry::get('Language'); if (isset($OSCOM_Product) && $OSCOM_Product instanceof \osCommerce\OM\Site\Shop\Product && $OSCOM_Product->isValid()) { $Qmanufacturer = $OSCOM_PDO->query('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', $OSCOM_Product->getID()); $Qmanufacturer->execute(); $result = $Qmanufacturer->fetch(); if (!empty($result)) { $this->_content = ''; if (strlen($result['manufacturers_image']) > 0) { $this->_content .= '<div style="text-align: center;">' . HTML::link(OSCOM::getLink(null, 'Index', 'Manufacturers=' . $result['manufacturers_id']), HTML::image('public/manufacturers/' . $result['manufacturers_image'], $result['manufacturers_name'])) . '</div>'; } $this->_content .= '<ol style="list-style: none; margin: 0; padding: 0;">'; if (strlen($result['manufacturers_url']) > 0) { $this->_content .= '<li>' . HTML::link(OSCOM::getLink(null, 'Redirct', 'Manufacturer=' . $result['manufacturers_id']), sprintf(OSCOM::getDef('box_manufacturer_info_website'), $result['manufacturers_name']), 'target="_blank"') . '</li>'; } $this->_content .= '<li>' . HTML::link(OSCOM::getLink(null, 'Index', 'Manufacturers=' . $result['manufacturers_id']), OSCOM::getDef('box_manufacturer_info_products')) . '</li>'; $this->_content .= '</ol>'; } } }
public function initialize() { $OSCOM_ShoppingCart = Registry::get('ShoppingCart'); $OSCOM_Template = Registry::get('Template'); $steps = array(); if ($OSCOM_ShoppingCart->getContentType() != 'virtual') { $steps[] = array('title' => OSCOM::getDef('box_ordering_steps_delivery'), 'code' => 'shipping', 'active' => $OSCOM_Template->getModule() == 'Shipping' || $OSCOM_Template->getModule() == 'ShippingAddress' ? true : false); } $steps[] = array('title' => OSCOM::getDef('box_ordering_steps_payment'), 'code' => 'payment', 'active' => $OSCOM_Template->getModule() == 'Payment' || $OSCOM_Template->getModule() == 'PaymentAddress' ? true : false); $steps[] = array('title' => OSCOM::getDef('box_ordering_steps_confirmation'), 'code' => 'confirmation', 'active' => $OSCOM_Template->getModule() == 'Confirmation' ? true : false); $steps[] = array('title' => OSCOM::getDef('box_ordering_steps_complete'), 'active' => $OSCOM_Template->getModule() == 'Success' ? true : false); $content = HTML::image('templates/' . $OSCOM_Template->getCode() . '/images/icons/32x32/checkout_preparing_to_ship.gif') . '<br />'; $counter = 0; foreach ($steps as $step) { $counter++; $content .= '<span style="white-space: nowrap;"> ' . HTML::image('templates/' . $OSCOM_Template->getCode() . '/images/icons/24x24/checkout_' . $counter . ($step['active'] === true ? '_on' : '') . '.gif', $step['title'], 24, 24, 'align="absmiddle"'); if (isset($step['code'])) { $content .= HTML::link(OSCOM::getLink(null, 'Checkout', $step['code'], 'SSL'), $step['title'], 'class="boxCheckoutTrail' . ($step['active'] === true ? 'Active' : '') . '"'); } else { $content .= '<span class="boxCheckoutTrail' . ($step['active'] === true ? 'Active' : '') . '">' . $step['title'] . '</span>'; } $content .= '</span><br />'; } $content .= HTML::image('templates/' . $OSCOM_Template->getCode() . '/images/icons/32x32/checkout_ready_to_ship.gif'); $this->_content = $content; }
public function quote() { $this->quotes = array('id' => $this->_code, 'module' => $this->_title, 'methods' => array(array('id' => $this->_code, 'title' => OSCOM::getDef('shipping_flat_method'), 'cost' => MODULE_SHIPPING_FLAT_COST)), 'tax_class_id' => $this->tax_class); if (!empty($this->icon)) { $this->quotes['icon'] = HTML::image($this->icon, $this->_title); } return $this->quotes; }
public function initialize() { $OSCOM_Service = Registry::get('Service'); $OSCOM_Cache = Registry::get('Cache'); $OSCOM_Product = Registry::exists('Product') ? Registry::get('Product') : null; $OSCOM_Language = Registry::get('Language'); $OSCOM_PDO = Registry::get('PDO'); $OSCOM_Image = Registry::get('Image'); $this->_title_link = OSCOM::getLink(null, 'Products', 'Reviews'); if ($OSCOM_Service->isStarted('Reviews')) { if (BOX_REVIEWS_CACHE > 0 && $OSCOM_Cache->read('box-reviews' . (isset($OSCOM_Product) && $OSCOM_Product instanceof \osCommerce\OM\Site\Shop\Product && $OSCOM_Product->isValid() ? '-' . $OSCOM_Product->getID() : '') . '-' . $OSCOM_Language->getCode(), BOX_REVIEWS_CACHE)) { $data = $OSCOM_Cache->getCache(); } else { $data = array(); $sql_query = 'select r.reviews_id, r.reviews_rating, p.products_id, pd.products_name, pd.products_keyword, i.image from :table_reviews r, :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 r.products_id = p.products_id and p.products_status = 1 and r.languages_id = :language_id and p.products_id = pd.products_id and pd.language_id = :language_id and r.reviews_status = 1'; if (isset($OSCOM_Product) && $OSCOM_Product instanceof \osCommerce\OM\Site\Shop\Product && $OSCOM_Product->isValid()) { $sql_query .= ' and p.products_id = :products_id'; } $sql_query .= ' order by r.reviews_id desc limit :max_random_select_reviews'; $Qreview = $OSCOM_PDO->prepare($sql_query); $Qreview->bindInt(':default_flag', 1); $Qreview->bindInt(':language_id', $OSCOM_Language->getID()); $Qreview->bindInt(':language_id', $OSCOM_Language->getID()); if (isset($OSCOM_Product) && $OSCOM_Product instanceof \osCommerce\OM\Site\Shop\Product && $OSCOM_Product->isValid()) { $Qreview->bindInt(':products_id', $OSCOM_Product->getID()); } $Qreview->bindInt(':max_random_select_reviews', BOX_REVIEWS_RANDOM_SELECT); $Qreview->execute(); $result = $Qreview->fetchAll(); if (count($result) > 0) { $result = $result[rand(0, count($result) - 1)]; $Qtext = $OSCOM_PDO->prepare('select substring(reviews_text, 1, 60) as reviews_text from :table_reviews where reviews_id = :reviews_id and languages_id = :languages_id'); $Qtext->bindInt(':reviews_id', $result['reviews_id']); $Qtext->bindInt(':languages_id', $OSCOM_Language->getID()); $Qtext->execute(); $data = array_merge($result, $Qtext->fetch()); } $OSCOM_Cache->write($data); } $this->_content = ''; if (empty($data)) { if (isset($OSCOM_Product) && $OSCOM_Product instanceof \osCommerce\OM\Site\Shop\Product && $OSCOM_Product->isValid()) { $this->_content = '<div style="float: left; width: 55px;">' . HTML::button(array('href' => OSCOM::getLink(null, 'Products', 'Reviews&Write&' . $OSCOM_Product->getKeyword()), 'icon' => 'pencil', 'title' => OSCOM::getDef('button_write_review'))) . '</div>' . HTML::link(OSCOM::getLink(null, 'Products', 'Reviews&Write&' . $OSCOM_Product->getKeyword()), OSCOM::getDef('box_reviews_write')) . '<div style="clear: both;"></div>'; } } else { if (!empty($data['image'])) { $this->_content = '<div align="center">' . HTML::link(OSCOM::getLink(null, 'Products', 'Reviews&View=' . $data['reviews_id'] . '&' . $data['products_keyword']), $OSCOM_Image->show($data['image'], $data['products_name'])) . '</div>'; } $this->_content .= HTML::link(OSCOM::getLink(null, 'Products', 'Reviews&View=' . $data['reviews_id'] . '&' . $data['products_keyword']), wordwrap(HTML::outputProtected($data['reviews_text']), 15, '­') . ' ..') . '<br /><div align="center">' . HTML::image(OSCOM::getPublicSiteLink('images/stars_' . $data['reviews_rating'] . '.png'), sprintf(OSCOM::getDef('box_reviews_stars_rating'), $data['reviews_rating'])) . '</div>'; } } }
public function show($image, $title, $parameters = null, $group = null) { if (empty($group) || !$this->exists($group)) { $group = $this->getCode(DEFAULT_IMAGE_GROUP_ID); } $group_id = $this->getID($group); $width = $height = ''; if ($this->_groups[$group_id]['force_size'] == '1' || empty($image)) { $width = $this->_groups[$group_id]['size_width']; $height = $this->_groups[$group_id]['size_height']; } if (empty($image)) { $image = 'pixel_trans.gif'; } else { $image = $this->_groups[$group_id]['code'] . '/' . $image; } $url = OSCOM::getRequestType() == 'NONSSL' ? OSCOM::getConfig('product_images_http_server') . OSCOM::getConfig('product_images_dir_ws_http_server') : OSCOM::getConfig('product_images_http_server') . OSCOM::getConfig('product_images_dir_ws_http_server'); return HTML::image($url . $image, $title, $width, $height, $parameters); }
public function initialize() { $OSCOM_Product = Registry::exists('Product') ? Registry::get('Product') : null; $OSCOM_Customer = Registry::get('Customer'); $OSCOM_PDO = Registry::get('PDO'); $OSCOM_Language = Registry::get('Language'); $this->_title_link = OSCOM::getLink(null, 'Account', 'Notifications', 'SSL'); if (isset($OSCOM_Product) && $OSCOM_Product instanceof \osCommerce\OM\Site\Shop\Product && $OSCOM_Product->isValid()) { if ($OSCOM_Customer->isLoggedOn()) { $Qcheck = $OSCOM_PDO->prepare('select global_product_notifications from :table_customers where customers_id = :customers_id'); $Qcheck->bindInt(':customers_id', $OSCOM_Customer->getID()); $Qcheck->execute(); if ($Qcheck->valueInt('global_product_notifications') === 0) { $get_params = array(); foreach ($_GET as $key => $value) { if ($key != 'action' && $key != Registry::get('Session')->getName() && $key != 'x' && $key != 'y') { $get_params[] = $key . '=' . $value; } } $get_params = implode($get_params, '&'); if (!empty($get_params)) { $get_params .= '&'; } $Qcheck = $OSCOM_PDO->prepare('select products_id from :table_products_notifications where products_id = :products_id and customers_id = :customers_id limit 1'); $Qcheck->bindInt(':products_id', $OSCOM_Product->getID()); $Qcheck->bindInt(':customers_id', $OSCOM_Customer->getID()); $Qcheck->execute(); $result = $Qcheck->fetch(); if (!empty($result)) { $this->_content = '<div style="float: left; width: 55px;">' . HTML::link(OSCOM::getLink(null, null, $get_params . 'action=notify_remove', 'AUTO'), HTML::image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', sprintf(OSCOM::getDef('box_product_notifications_remove'), $OSCOM_Product->getTitle()))) . '</div>' . HTML::link(OSCOM::getLink(null, null, $get_params . 'action=notify_remove', 'AUTO'), sprintf(OSCOM::getDef('box_product_notifications_remove'), $OSCOM_Product->getTitle())); } else { $this->_content = '<div style="float: left; width: 55px;">' . HTML::link(OSCOM::getLink(null, null, $get_params . 'action=notify_add', 'AUTO'), HTML::image(DIR_WS_IMAGES . 'box_products_notifications.gif', sprintf(OSCOM::getDef('box_product_notifications_add'), $OSCOM_Product->getTitle()))) . '</div>' . HTML::link(OSCOM::getLink(null, null, $get_params . 'action=notify_add', 'AUTO'), sprintf(OSCOM::getDef('box_product_notifications_add'), $OSCOM_Product->getTitle())); } $this->_content .= '<div style="clear: both;"></div>'; } } } }
var dataTableDataURL = '<?php echo OSCOM::getRPCLink(null, null, 'GetAll'); ?> '; var languageLink = '<?php echo OSCOM::getLink(null, null, 'id=LANGUAGEID'); ?> '; var languageLinkIcon = '<?php echo HTML::icon('folder.png'); ?> '; var languageIcon = '<?php echo HTML::image(OSCOM::getPublicSiteLink('images/worldflags/LANGUAGECODE.png', null, 'Shop'), 'LANGUAGENAME'); ?> '; var languageEditLink = '<?php echo OSCOM::getLink(null, null, 'Save&id=LANGUAGEID'); ?> '; var languageEditLinkIcon = '<?php echo HTML::icon('edit.png'); ?> '; var languageExportLink = '<?php echo OSCOM::getLink(null, null, 'Export&id=LANGUAGEID'); ?>
<?php /** * osCommerce Online Merchant * * @copyright Copyright (c) 2012 osCommerce; http://www.oscommerce.com * @license BSD License; http://www.oscommerce.com/bsdlicense.txt */ use osCommerce\OM\Core\Access; use osCommerce\OM\Core\HTML; use osCommerce\OM\Core\OSCOM; ?> <div id="adminMenu"> <ul class="apps"> <li class="shortcuts"><?php echo HTML::link(OSCOM::getLink(null, OSCOM::getDefaultSiteApplication()), HTML::image(OSCOM::getPublicSiteLink('images/oscommerce_icon.png'), null, 16, 16)); ?></li> <?php if ( isset($_SESSION[OSCOM::getSite()]['id']) ) { echo ' <li><a href="#">Applications ▾</a>' . ' <ul>'; foreach ( Access::getLevels() as $group => $links ) { $application = current($links); echo ' <li><a href="' . OSCOM::getLink(null, $application['module']) . '"><span style="float: right;">▸</span>' . Access::getGroupTitle($group) . '</a>' . ' <ul>'; foreach ( $links as $link ) { echo ' <li><a href="' . OSCOM::getLink(null, $link['module']) . '">' . $OSCOM_Template->getIcon(16, $link['icon']) . ' ' . $link['title'] . '</a></li>'; }
<div style="float: right; text-align: center;"> <?php echo HTML::link(OSCOM::getLink(null, null, 'Images&' . $OSCOM_Product->getKeyword()), $OSCOM_Image->show($OSCOM_Product->getImage(), $OSCOM_Product->getTitle(), 'hspace="5" vspace="5"', 'thumbnail'), 'target="_blank" onclick="window.open(\'' . OSCOM::getLink(null, null, 'Images&' . $OSCOM_Product->getKeyword()) . '\', \'popUp\', \'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=' . ($OSCOM_Product->numberOfImages() > 1 ? $OSCOM_Image->getWidth('large') + $OSCOM_Image->getWidth('thumbnails') * 2 + 70 : $OSCOM_Image->getWidth('large') + 20) . ',height=' . ($OSCOM_Image->getHeight('large') + 20) . '\'); return false;"'); ?> <?php echo '<p>' . HTML::button(array('href' => OSCOM::getLink(null, 'Cart', 'Add&' . $OSCOM_Product->getKeyword()), 'icon' => 'cart', 'title' => OSCOM::getDef('button_add_to_cart'))) . '</p>'; ?> </div> <?php } ?> <p><?php echo HTML::image(OSCOM::getPublicSiteLink('images/stars_' . $Qreviews->valueInt('reviews_rating') . '.png'), sprintf(OSCOM::getDef('rating_of_5_stars'), $Qreviews->valueInt('reviews_rating'))) . ' ' . sprintf(OSCOM::getDef('reviewed_by'), $Qreviews->valueProtected('customers_name')) . '; ' . DateTime::getLong($Qreviews->value('date_added')); ?> </p> <p><?php echo nl2br(wordwrap($Qreviews->valueProtected('reviews_text'), 60, '­')); ?> </p> <div class="submitFormButtons"> <span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Reviews&Write&' . $OSCOM_Product->getKeyword()), 'icon' => 'pencil', 'title' => OSCOM::getDef('button_write_review'))); ?> </span> <?php
public function testImageWithoutWidthAndHeight() { $this->assertEquals('<img src="http://www.oscommerce.com/images/oscommerce.gif" border="0" alt="osCommerce" title="osCommerce" id="logo" />', HTML::image('http://www.oscommerce.com/images/oscommerce.gif', 'osCommerce', '', '', 'id="logo"')); }
public function showImage($code = null, $width = 16, $height = 10, $parameters = null) { if (!isset($code)) { $code = $this->_code; } $image_code = strtolower(substr($code, 3)); if (!is_numeric($width)) { $width = 16; } if (!is_numeric($height)) { $height = 10; } return HTML::image(OSCOM::getPublicSiteLink('images/worldflags/' . $image_code . '.png', null, 'Shop'), $this->_languages[$code]['name'], $width, $height, $parameters); }
} $counter = 0; $reviews_listing = Reviews::getListing($OSCOM_Product->getID()); foreach ($reviews_listing['entries'] as $r) { $counter++; if ($counter > 1) { ?> <hr style="height: 1px; width: 150px; text-align: left; margin-left: 0px" /> <?php } ?> <p><?php echo HTML::image(OSCOM::getPublicSiteLink('images/stars_' . (int) $r['reviews_rating'] . '.png'), sprintf(OSCOM::getDef('rating_of_5_stars'), (int) $r['reviews_rating'])) . ' ' . sprintf(OSCOM::getDef('reviewed_by'), HTML::outputProtected($r['customers_name'])) . '; ' . DateTime::getLong($r['date_added']); ?> </p> <p><?php echo nl2br(wordwrap(HTML::outputProtected($r['reviews_text']), 60, '­')); ?> </p> <?php } ?> <div class="listingPageLinks"> <span style="float: right;"><?php echo PDO::getBatchPageLinks('page', $reviews_listing['total'], OSCOM::getAllGET('page'));
#pageColumnLeft { width: 16%; } //--></style> <?php } unset($content_left); unset($content_right); if ($OSCOM_Template->hasPageHeader()) { ?> <div id="pageHeader"> <?php echo HTML::link(OSCOM::getLink(OSCOM::getDefaultSite(), OSCOM::getDefaultSiteApplication()), HTML::image(OSCOM::getPublicSiteLink('images/store_logo.png'), STORE_NAME), 'id="siteLogo"'); ?> <div id="navigationIcons"> <?php echo HTML::button(array('title' => OSCOM::getDef('cart_contents') . ($OSCOM_ShoppingCart->numberOfItems() > 0 ? ' (' . $OSCOM_ShoppingCart->numberOfItems() . ')' : ''), 'icon' => 'cart', 'href' => OSCOM::getLink(null, 'Cart'))) . HTML::button(array('title' => OSCOM::getDef('checkout'), 'icon' => 'triangle-1-e', 'href' => OSCOM::getLink(null, 'Checkout', null, 'SSL'))) . HTML::button(array('title' => OSCOM::getDef('my_account'), 'icon' => 'person', 'href' => OSCOM::getLink(null, 'Account', null, 'SSL'))); if ($OSCOM_Customer->isLoggedOn()) { echo HTML::button(array('title' => OSCOM::getDef('sign_out'), 'href' => OSCOM::getLink(null, 'Account', 'LogOff', 'SSL'))); } ?> </div> <script type="text/javascript"> $('#navigationIcons').buttonset();
?> (<?php echo sprintf(OSCOM::getDef('reviewed_by'), HTML::outputProtected($r['customers_name'])); ?> )</h6> <div class="content"> <?php if (!empty($r['image'])) { echo HTML::link(OSCOM::getLink(null, 'Products', 'Reviews&View=' . $r['reviews_id'] . '&' . $r['products_keyword']), $OSCOM_Image->show($r['image'], $r['products_name'], 'style="float: left;"')); } ?> <p style="padding-left: 100px;"><?php echo wordwrap(HTML::outputProtected($r['reviews_text']), 60, '­') . (strlen(HTML::outputProtected($r['reviews_text'])) >= 100 ? '..' : '') . '<br /><br /><i>' . sprintf(OSCOM::getDef('review_rating'), HTML::image(OSCOM::getPublicSiteLink('images/stars_' . (int) $r['reviews_rating'] . '.png'), sprintf(OSCOM::getDef('rating_of_5_stars'), (int) $r['reviews_rating'])), sprintf(OSCOM::getDef('rating_of_5_stars'), (int) $r['reviews_rating'])) . '</i>'; ?> </p> <div style="clear: both;"></div> </div> </div> <?php } ?> <div class="listingPageLinks"> <span style="float: right;"><?php echo PDO::getBatchPageLinks('page', $reviews_listing['total'], OSCOM::getAllGET('page')); ?>
/** * osCommerce Online Merchant * * @copyright Copyright (c) 2011 osCommerce; http://www.oscommerce.com * @license BSD License; http://www.oscommerce.com/bsdlicense.txt */ use osCommerce\OM\Core\Access; use osCommerce\OM\Core\HTML; use osCommerce\OM\Core\OSCOM; ?> <div id="adminMenu"> <ul class="apps"> <li class="shortcuts"><?php echo HTML::link(OSCOM::getLink(null, OSCOM::getDefaultSiteApplication()), HTML::image(OSCOM::getPublicSiteLink('images/oscommerce_icon.png'), null, 16, 16)); ?> </li> <?php if (isset($_SESSION[OSCOM::getSite()]['id'])) { echo ' <li><a href="#">Applications ▾</a>' . ' <ul>'; foreach (Access::getLevels() as $group => $links) { $application = current($links); echo ' <li><a href="' . OSCOM::getLink(null, $application['module']) . '"><span style="float: right;">▸</span>' . Access::getGroupTitle($group) . '</a>' . ' <ul>'; foreach ($links as $link) { echo ' <li><a href="' . OSCOM::getLink(null, $link['module']) . '">' . $OSCOM_Template->getIcon(16, $link['icon']) . ' ' . $link['title'] . '</a></li>'; } echo ' </ul>' . ' </li>'; } echo ' </ul>' . ' </li>';
/** * Display a banner. If no ID is passed, the value defined in $_exists_id is * used. * * @param int $id The ID of the banner to show * @access public * @return string */ public function display($id = null) { $OSCOM_PDO = Registry::get('PDO'); $banner_string = ''; if (empty($id) && isset($this->_exists_id) && is_numeric($this->_exists_id)) { $id = $this->_exists_id; unset($this->_exists_id); } $Qbanner = $OSCOM_PDO->prepare('select * from :table_banners where banners_id = :banners_id and status = 1'); $Qbanner->bindInt(':banners_id', $id); $Qbanner->execute(); $result = $Qbanner->fetch(); if ($result !== false) { if (!empty($result['banners_html_text'])) { $banner_string = $result['banners_html_text']; } else { // HPDL create Redirect action; fix banner image location $banner_string = HTML::link(OSCOM::getLink('Shop', 'Index', 'Redirect&action=banner&goto=' . (int) $result['banners_id']), HTML::image('public/' . $Qbanner->value('banners_image'), $Qbanner->value('banners_title')), 'target="_blank"'); } $this->_updateDisplayCount($result['banners_id']); if ($this->_show_duplicates_in_group === false) { $this->_shown_ids[] = $result['banners_id']; } } return $banner_string; }
var dataTableDataURL = '<?php echo OSCOM::getRPCLink(null, null, 'GetAll'); ?> '; var countryLink = '<?php echo OSCOM::getLink(null, null, 'id=COUNTRYID'); ?> '; var countryLinkIcon = '<?php echo HTML::icon('folder.png'); ?> '; var countryFlag = '<?php echo HTML::image(OSCOM::getPublicSiteLink('images/worldflags/COUNTRYISOCODE2.png', null, 'Shop'), 'COUNTRYNAME'); ?> '; var countryEditLink = '<?php echo OSCOM::getLink(null, null, 'Save&id=COUNTRYID'); ?> '; var countryEditLinkIcon = '<?php echo HTML::icon('edit.png'); ?> '; var countryDeleteLink = '<?php echo OSCOM::getLink(null, null, 'Delete&id=COUNTRYID'); ?>
} else { $Qcategories = $OSCOM_PDO->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', $category_links[$i]); $Qcategories->bindInt(':language_id', $OSCOM_Language->getID()); $Qcategories->execute(); break; // we've found the deepest category the customer is in } } } else { $Qcategories = $OSCOM_PDO->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', $OSCOM_Category->getID()); $Qcategories->bindInt(':language_id', $OSCOM_Language->getID()); $Qcategories->execute(); } $result = $Qcategories->fetchAll(); $number_of_categories = count($result); $width = (int) (100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%'; $rows = 0; foreach ($result as $c) { $rows++; echo ' <td align="center" class="smallText" width="' . $width . '" valign="top">' . HTML::link(OSCOM::getLink(null, 'Index', 'cPath=' . $OSCOM_CategoryTree->buildBreadcrumb($c['categories_id'])), HTML::image('public/categories/' . $c['categories_image'], $c['categories_name']) . '<br />' . $c['categories_name']) . '</td>' . "\n"; if ($rows / MAX_DISPLAY_CATEGORIES_PER_ROW == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) && $rows != $number_of_categories) { echo ' </tr>' . "\n" . ' <tr>' . "\n"; } } ?> </tr> </table>