本文整理汇总了PHP中osCommerce\OM\Core\HTML::image方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::image方法的具体用法?PHP HTML::image怎么用?PHP HTML::image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osCommerce\OM\Core\HTML
的用法示例。
在下文中一共展示了HTML::image方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getIcon
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);
}
示例2: initialize
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>';
}
}
}
示例3: quote
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;
}
示例4: show
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);
}
示例5:
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');
?>
示例6: foreach
<?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>';
}
示例7: nl2br
<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
示例8: testImageWithoutWidthAndHeight
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"'));
}
示例9: showImage
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);
}
示例10: sprintf
}
$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'));
示例11:
#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();
示例12: sprintf
?>
(<?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'));
?>
示例13: foreach
/**
* 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>';
示例14: display
/**
* 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;
}
示例15:
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');
?>