本文整理汇总了PHP中osCommerce\OM\Core\HTML::link方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::link方法的具体用法?PHP HTML::link怎么用?PHP HTML::link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osCommerce\OM\Core\HTML
的用法示例。
在下文中一共展示了HTML::link方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
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;
}
示例2: add
/**
* Adds an entry to the breadcrumb navigation path
*
* @param string $title The title of the breadcrumb navigation entry
* @param string $link The link of the breadcrumb navigation entry
* @access public
*/
public function add($title, $link = null)
{
if (!empty($link)) {
$title = HTML::link($link, $title);
}
$this->_path[] = $title;
}
示例3: initialize
public function initialize()
{
if (Registry::exists('Product')) {
$OSCOM_PDO = Registry::get('PDO');
$OSCOM_Product = Registry::get('Product');
$OSCOM_Language = Registry::get('Language');
$OSCOM_Image = Registry::get('Image');
$Qorders = $OSCOM_PDO->prepare('select p.products_id, pd.products_name, pd.products_keyword, i.image from :table_orders_products opa, :table_orders_products opb, :table_orders o, :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 opa.products_id = :products_id and opa.orders_id = opb.orders_id and opb.products_id != :products_id and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id group by p.products_id order by o.date_purchased desc limit :limit');
$Qorders->bindInt(':default_flag', 1);
$Qorders->bindInt(':products_id', $OSCOM_Product->getID());
$Qorders->bindInt(':products_id', $OSCOM_Product->getID());
$Qorders->bindInt(':language_id', $OSCOM_Language->getID());
$Qorders->bindInt(':limit', MODULE_CONTENT_ALSO_PURCHASED_MAX_DISPLAY);
if (MODULE_CONTENT_ALSO_PURCHASED_PRODUCTS_CACHE > 0) {
$Qorders->setCache('also_purchased-' . $OSCOM_Product->getID(), MODULE_CONTENT_ALSO_PURCHASED_PRODUCTS_CACHE);
}
$Qorders->execute();
$result = $Qorders->fetchAll();
if (count($result) >= MODULE_CONTENT_ALSO_PURCHASED_MIN_DISPLAY) {
$this->_content = '<div style="overflow: auto;">';
foreach ($result as $p) {
$this->_content .= '<span style="width: 33%; float: left; text-align: center;">';
if (strlen($p['image']) > 0) {
$this->_content .= HTML::link(OSCOM::getLink(null, 'Products', $p['products_keyword']), $OSCOM_Image->show($p['image'], $p['products_name'])) . '<br />';
}
$this->_content .= HTML::link(OSCOM::getLink(null, 'Products', $p['products_keyword']), $p['products_name']) . '</span>';
}
$this->_content .= '</div>';
}
}
}
示例4: __construct
public function __construct()
{
Registry::get('Language')->loadIniFile('modules/Dashboard/Customers.php');
$this->_title = OSCOM::getDef('admin_indexmodules_customers_title');
$this->_title_link = OSCOM::getLink(null, 'Customers');
if (Access::hasAccess(OSCOM::getSite(), 'Customers')) {
$this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . ' <thead>' . ' <tr>' . ' <th>' . OSCOM::getDef('admin_indexmodules_customers_table_heading_customers') . '</th>' . ' <th>' . OSCOM::getDef('admin_indexmodules_customers_table_heading_date') . '</th>' . ' <th>' . OSCOM::getDef('admin_indexmodules_customers_table_heading_status') . '</th>' . ' </tr>' . ' </thead>' . ' <tbody>';
$Qcustomers = Registry::get('PDO')->query('select customers_id, customers_gender, customers_lastname, customers_firstname, customers_status, date_account_created from :table_customers order by date_account_created desc limit 6');
$Qcustomers->execute();
$counter = 0;
while ($Qcustomers->fetch()) {
$customer_icon = HTML::icon('people.png');
if (ACCOUNT_GENDER > -1) {
switch ($Qcustomers->value('customers_gender')) {
case 'm':
$customer_icon = HTML::icon('user_male.png');
break;
case 'f':
$customer_icon = HTML::icon('user_female.png');
break;
}
}
$this->_data .= ' <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . ' <td>' . HTML::link(OSCOM::getLink(null, 'Customers', 'Save&id=' . $Qcustomers->valueInt('customers_id')), $customer_icon . ' ' . $Qcustomers->valueProtected('customers_firstname') . ' ' . $Qcustomers->valueProtected('customers_lastname')) . '</td>' . ' <td>' . $Qcustomers->value('date_account_created') . '</td>' . ' <td align="center">' . HTML::icon($Qcustomers->valueInt('customers_status') === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif', null, null) . '</td>' . ' </tr>';
$counter++;
}
$this->_data .= ' </tbody>' . '</table>';
}
}
示例5:
<?php
/**
* 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\HTML;
use osCommerce\OM\Core\OSCOM;
?>
<div style="float: right;"><?php
echo HTML::link(OSCOM::getLink(null, null, $OSCOM_Product->getKeyword()), $OSCOM_Image->show($OSCOM_Product->getImage(), $OSCOM_Product->getTitle(), 'hspace="5" vspace="5"', 'mini'));
?>
</div>
<h1><?php
echo $OSCOM_Template->getPageTitle() . ($OSCOM_Product->hasModel() ? '<br /><span class="smallText">' . $OSCOM_Product->getModel() . '</span>' : '');
?>
</h1>
<div style="clear: both;"></div>
<?php
if ($OSCOM_MessageStack->exists('Reviews')) {
echo $OSCOM_MessageStack->get('Reviews');
}
?>
<form name="reviews_write" action="<?php
示例6: sprintf
?>
</div>
<h6><?php
echo HTML::link(OSCOM::getLink(null, 'Products', 'Reviews&View=' . $r['reviews_id'] . '&' . $r['products_keyword']), $r['products_name']);
?>
(<?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
}
?>
示例7:
#pageContent {
width: 100%;
margin: 0;
padding: 0;
}
div#pageBlockLeft {
width: 100%;
margin: 0;
}
</style>
<div class="moduleBox">
<h6><?php
echo OSCOM::getDef('search_help_heading');
?>
</h6>
<div class="content">
<p><?php
echo OSCOM::getDef('search_help');
?>
</p>
<p align="right"><?php
echo HTML::link('javascript:window.close();', OSCOM::getDef('close_window'));
?>
</p>
</div>
</div>
示例8: foreach
' </li>';
?>
</ul>
<?php
$total_shortcuts = 0;
if ( isset($_SESSION[OSCOM::getSite()]['id']) ) {
echo '<ul class="apps" style="float: right;">';
if ( $OSCOM_Application->canLinkTo() ) {
if ( Access::isShortcut(OSCOM::getSiteApplication()) ) {
echo ' <li class="shortcuts">' . HTML::link(OSCOM::getLink(null, 'Dashboard', 'RemoveShortcut&shortcut=' . OSCOM::getSiteApplication()), HTML::icon('shortcut_remove.png')) . '</li>';
} else {
echo ' <li class="shortcuts">' . HTML::link(OSCOM::getLink(null, 'Dashboard', 'AddShortcut&shortcut=' . OSCOM::getSiteApplication()), HTML::icon('shortcut_add.png')) . '</li>';
}
}
if ( Access::hasShortcut() ) {
echo ' <li class="shortcuts">';
foreach ( Access::getShortcuts() as $shortcut ) {
echo '<a href="' . OSCOM::getLink(null, $shortcut['module']) . '" id="shortcut-' . $shortcut['module'] . '">' . $OSCOM_Template->getIcon(16, $shortcut['icon'], $shortcut['title']) . '<div class="notBubble"></div></a>';
$total_shortcuts++;
}
echo ' </li>';
}
示例9:
echo HTML::link(OSCOM::getLink(null, 'Info'), OSCOM::getDef('box_information_heading'));
?>
<ul>
<li><?php
echo HTML::link(OSCOM::getLink(null, 'Info', 'Shipping'), OSCOM::getDef('box_information_shipping'));
?>
</li>
<li><?php
echo HTML::link(OSCOM::getLink(null, 'Info', 'Privacy'), OSCOM::getDef('box_information_privacy'));
?>
</li>
<li><?php
echo HTML::link(OSCOM::getLink(null, 'Info', 'Conditions'), OSCOM::getDef('box_information_conditions'));
?>
</li>
<li><?php
echo HTML::link(OSCOM::getLink(null, 'Info', 'Contact'), OSCOM::getDef('box_information_contact'));
?>
</li>
</ul>
</li>
</ul>
</div>
<div style="width: 49%;">
<?php
echo $OSCOM_CategoryTree->getTree();
?>
</div>
</div>
示例10: sprintf
<h1><?php
echo $OSCOM_Template->getPageTitle() . ($OSCOM_Product->hasModel() ? '<br /><span class="smallText">' . $OSCOM_Product->getModel() . '</span>' : '');
?>
</h1>
<?php
if ($OSCOM_MessageStack->exists('Reviews')) {
echo $OSCOM_MessageStack->get('Reviews');
}
if ($OSCOM_Product->hasImage()) {
?>
<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
}
if ($OSCOM_Product->getData('reviews_average_rating') > 0) {
?>
<p><?php
echo OSCOM::getDef('average_rating') . ' ' . HTML::image(OSCOM::getPublicSiteLink('images/stars_' . $OSCOM_Product->getData('reviews_average_rating') . '.png'), sprintf(OSCOM::getDef('rating_of_5_stars'), $OSCOM_Product->getData('reviews_average_rating')));
?>
</p>
示例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: isset
?>
<h1><?php
echo $OSCOM_Template->getPageTitle();
?>
</h1>
<div style="overflow: auto;">
<?php
foreach ($specials_listing['entries'] as $s) {
echo '<span style="width: 33%; float: left; text-align: center;">';
if (!empty($s['image'])) {
echo HTML::link(OSCOM::getLink(null, null, $s['products_keyword']), $OSCOM_Image->show($s['image'], $s['products_name'])) . '<br />';
}
echo HTML::link(OSCOM::getLink(null, null, $s['products_keyword']), $s['products_name']) . '<br />' . '<s>' . $OSCOM_Currencies->displayPrice($s['products_price'], $s['products_tax_class_id']) . '</s> <span class="productSpecialPrice">' . $OSCOM_Currencies->displayPrice($s['specials_new_products_price'], $s['products_tax_class_id']) . '</span>' . '</span>' . "\n";
}
?>
</div>
<div class="listingPageLinks">
<span style="float: right;"><?php
echo PDO::getBatchPageLinks('page', $specials_listing['total'], OSCOM::getAllGET('page'));
?>
</span>
<?php
echo PDO::getBatchTotalPages(OSCOM::getDef('result_set_number_of_products'), isset($_GET['page']) ? $_GET['page'] : 1, $specials_listing['total']);
?>
</div>
示例13: getListingSortLink
/**
* Create a sort heading with appropriate sort link
*
* @param string $key The key used for sorting
* @param string $heading The heading to use the link on
* @return string
* @since v3.0.0
*/
public static function getListingSortLink($key, $heading)
{
$current = false;
$direction = false;
if (!isset($_GET['sort'])) {
$current = 'name';
} elseif ($_GET['sort'] == $key || $_GET['sort'] == $key . '|d') {
$current = $key;
}
if ($key == $current) {
if (isset($_GET['sort'])) {
$direction = $_GET['sort'] == $key ? '+' : '-';
} else {
$direction = '+';
}
}
return HTML::link(OSCOM::getLink(null, null, OSCOM::getAllGET(array('page', 'sort')) . '&sort=' . $key . ($direction == '+' ? '|d' : '')), $heading . ($key == $current ? $direction : ''), 'title="' . (isset($_GET['sort']) && $_GET['sort'] == $key ? sprintf(OSCOM::getDef('listing_sort_ascendingly'), $heading) : sprintf(OSCOM::getDef('listing_sort_descendingly'), $heading)) . '" class="productListing-heading"');
}
示例14: getBatchNextPageLink
public static function getBatchNextPageLink($batch_keyword = 'page', $total, $parameters = null) {
$batch_number = (isset($_GET[$batch_keyword]) && is_numeric($_GET[$batch_keyword]) ? $_GET[$batch_keyword] : 1);
$number_of_pages = ceil($total / MAX_DISPLAY_SEARCH_RESULTS);
if ( !empty($parameters) ) {
$parameters .= '&';
}
$forward_string = HTML::icon('nav_forward.png', OSCOM::getDef('result_set_next_page'));
$forward_grey_string = HTML::icon('nav_forward_grey.png', OSCOM::getDef('result_set_next_page'));
$string = ' ';
if ( ( $batch_number < $number_of_pages ) && ( $number_of_pages != 1 ) ) {
$string .= HTML::link(OSCOM::getLink(null, null, $parameters . $batch_keyword . '=' . ($batch_number + 1)), $forward_string);
} else {
$string .= $forward_grey_string;
}
return $string;
}
示例15:
<?php
/**
* 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\HTML;
?>
<div class="ui-widget boxNew">
<div class="ui-widget-header boxTitle"><?php
echo HTML::link($OSCOM_Box->getTitleLink(), $OSCOM_Box->getTitle());
?>
</div>
<div class="ui-widget-content boxContents" style="text-align: center;"><?php
echo $OSCOM_Box->getContent();
?>
</div>
</div>