当前位置: 首页>>代码示例>>PHP>>正文


PHP Core\HTML类代码示例

本文整理汇总了PHP中osCommerce\OM\Core\HTML的典型用法代码示例。如果您正苦于以下问题:PHP HTML类的具体用法?PHP HTML怎么用?PHP HTML使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了HTML类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initialize

 public function initialize()
 {
     global $current_category_id;
     $OSCOM_PDO = Registry::get('PDO');
     $OSCOM_Language = Registry::get('Language');
     if (isset($current_category_id) && $current_category_id > 0) {
         $Qbestsellers = $OSCOM_PDO->prepare('select distinct p.products_id, pd.products_name, pd.products_keyword from :table_products p, :table_products_description pd, :table_products_to_categories p2c, :table_categories c where p.products_status = 1 and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = :language_id and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and :current_category_id in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit :max_display_bestsellers');
         $Qbestsellers->bindInt(':language_id', $OSCOM_Language->getID());
         $Qbestsellers->bindInt(':current_category_id', $current_category_id);
         $Qbestsellers->bindInt(':max_display_bestsellers', BOX_BEST_SELLERS_MAX_LIST);
         if (BOX_BEST_SELLERS_CACHE > 0) {
             $Qbestsellers->setCache('box_best_sellers-' . $current_category_id . '-' . $OSCOM_Language->getCode(), BOX_BEST_SELLERS_CACHE);
         }
         $Qbestsellers->execute();
     } else {
         $Qbestsellers = $OSCOM_PDO->prepare('select p.products_id, pd.products_name, pd.products_keyword from :table_products p, :table_products_description pd where p.products_status = 1 and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_ordered desc, pd.products_name limit :max_display_bestsellers');
         $Qbestsellers->bindInt(':language_id', $OSCOM_Language->getID());
         $Qbestsellers->bindInt(':max_display_bestsellers', BOX_BEST_SELLERS_MAX_LIST);
         if (BOX_BEST_SELLERS_CACHE > 0) {
             $Qbestsellers->setCache('box_best_sellers-0-' . $OSCOM_Language->getCode(), BOX_BEST_SELLERS_CACHE);
         }
         $Qbestsellers->execute();
     }
     $result = $Qbestsellers->fetchAll();
     if (count($result) >= BOX_BEST_SELLERS_MIN_LIST) {
         $this->_content = '<ol style="margin: 0; padding: 0 0 0 20px;">';
         foreach ($result as $r) {
             $this->_content .= '<li>' . HTML::link(OSCOM::getLink(null, 'Products', $r['products_keyword']), $r['products_name']) . '</li>';
         }
         $this->_content .= '</ol>';
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:32,代码来源:Controller.php

示例2: 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);
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:7,代码来源:Template.php

示例3: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = HTML::sanitize(basename($_GET['code']));
     if (!Services::exists($data) || Services::get($data, 'uninstallable') !== true) {
         OSCOM::redirect(OSCOM::getLink());
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:7,代码来源:Uninstall.php

示例4: 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>';
         }
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:31,代码来源:Controller.php

示例5: 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;
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:14,代码来源:Breadcrumb.php

示例6: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Shipping = Registry::get('Shipping');
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     if (!empty($_POST['comments'])) {
         $_SESSION['comments'] = HTML::sanitize($_POST['comments']);
     }
     if ($OSCOM_Shipping->hasQuotes()) {
         if (isset($_POST['shipping_mod_sel']) && strpos($_POST['shipping_mod_sel'], '_')) {
             list($module, $method) = explode('_', $_POST['shipping_mod_sel']);
             if (Registry::exists('Shipping_' . $module) && Registry::get('Shipping_' . $module)->isEnabled()) {
                 $quote = $OSCOM_Shipping->getQuote($_POST['shipping_mod_sel']);
                 if (isset($quote['error'])) {
                     $OSCOM_ShoppingCart->resetShippingMethod();
                 } else {
                     $OSCOM_ShoppingCart->setShippingMethod($quote);
                     OSCOM::redirect(OSCOM::getLink(null, null, null, 'SSL'));
                 }
             } else {
                 $OSCOM_ShoppingCart->resetShippingMethod();
             }
         }
     } else {
         $OSCOM_ShoppingCart->resetShippingMethod();
         OSCOM::redirect(OSCOM::getLink(null, null, null, 'SSL'));
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:27,代码来源:Process.php

示例7: __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 . '&nbsp;' . $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>';
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:28,代码来源:Customers.php

示例8: 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;
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:8,代码来源:Flat.php

示例9: osc_cfg_set_countries_pulldown_menu

function osc_cfg_set_countries_pulldown_menu($default, $key = null)
{
    $name = !empty($key) ? 'configuration[' . $key . ']' : 'configuration_value';
    $countries_array = array();
    foreach (Address::getCountries() as $country) {
        $countries_array[] = array('id' => $country['id'], 'text' => $country['name']);
    }
    return HTML::selectMenu($name, $countries_array, $default);
}
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:9,代码来源:osc_cfg_set_countries_pulldown_menu.php

示例10: osc_cfg_set_weight_classes_pulldown_menu

function osc_cfg_set_weight_classes_pulldown_menu($default, $key = null)
{
    $name = empty($key) ? 'configuration_value' : 'configuration[' . $key . ']';
    $weight_class_array = array();
    foreach (Weight::getClasses() as $class) {
        $weight_class_array[] = array('id' => $class['id'], 'text' => $class['title']);
    }
    return HTML::selectMenu($name, $weight_class_array, $default);
}
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:9,代码来源:osc_cfg_set_weight_classes_pulldown_menu.php

示例11: __construct

 public function __construct()
 {
     $this->initialize();
     if (isset($_GET['action']) && !empty($_GET['action'])) {
         $action = HTML::sanitize(basename($_GET['action']));
         if (class_exists('osCommerce\\OM\\Core\\Site\\' . OSCOM::getSite() . '\\Application\\' . OSCOM::getSiteApplication() . '\\Action\\' . $action)) {
             call_user_func(array('osCommerce\\OM\\Core\\Site\\' . OSCOM::getSite() . '\\Application\\' . OSCOM::getSiteApplication() . '\\Action\\' . $action, 'execute'), $this);
         }
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:10,代码来源:ApplicationAbstract.php

示例12: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = HTML::sanitize(basename($_GET['code']));
     if (Services::uninstall($data)) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
     }
     OSCOM::redirect(OSCOM::getLink());
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:10,代码来源:Process.php

示例13: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = HTML::sanitize(basename($_GET['code']));
     if (PaymentModules::install($data)) {
         OSCOM::redirect(OSCOM::getLink(null, null, 'Save&code=' . $_GET['code']));
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
         OSCOM::redirect(OSCOM::getLink());
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:10,代码来源:Process.php

示例14: initialize

 protected function initialize()
 {
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     $OSCOM_Customer = Registry::get('Customer');
     $OSCOM_Language = Registry::get('Language');
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     $OSCOM_MessageStack = Registry::get('MessageStack');
     // redirect to shopping cart if shopping cart is empty
     if (!$OSCOM_ShoppingCart->hasContents()) {
         OSCOM::redirect(OSCOM::getLink(null, 'Cart'));
     }
     // check for e-mail address
     if (!$OSCOM_Customer->hasEmailAddress()) {
         if (isset($_POST['email']) && strlen(trim($_POST['email'])) >= ACCOUNT_EMAIL_ADDRESS) {
             if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
                 $OSCOM_Customer->setEmailAddress(trim($_POST['email']));
             } else {
                 $OSCOM_MessageStack->add('Cart', OSCOM::getDef('field_customer_email_address_check_error'));
                 OSCOM::redirect(OSCOM::getLink(null, 'Cart'));
             }
         } else {
             $OSCOM_MessageStack->add('Cart', sprintf(OSCOM::getDef('field_customer_email_address_error'), ACCOUNT_EMAIL_ADDRESS));
             OSCOM::redirect(OSCOM::getLink(null, 'Cart'));
         }
     }
     // check product type perform_order conditions
     foreach ($OSCOM_ShoppingCart->getProducts() as $product) {
         $OSCOM_Product = new Product($product['id']);
         $OSCOM_Product->isTypeActionAllowed('PerformOrder');
     }
     $OSCOM_Language->load('checkout');
     $OSCOM_Language->load('order');
     $this->_page_title = OSCOM::getDef('confirmation_heading');
     if ($OSCOM_Service->isStarted('Breadcrumb')) {
         $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_checkout_confirmation'), OSCOM::getLink(null, 'Checkout', null, 'SSL'));
     }
     if (isset($_POST['comments']) && isset($_SESSION['comments']) && empty($_POST['comments'])) {
         unset($_SESSION['comments']);
     } elseif (!empty($_POST['comments'])) {
         $_SESSION['comments'] = HTML::sanitize($_POST['comments']);
     }
     if (DISPLAY_CONDITIONS_ON_CHECKOUT == '1') {
         if (!isset($_POST['conditions']) || $_POST['conditions'] != '1') {
             $OSCOM_MessageStack->add('Checkout', OSCOM::getDef('error_conditions_not_accepted'), 'error');
         }
     }
     if (Registry::exists('Payment') === false) {
         Registry::set('Payment', new Payment());
     }
     if ($OSCOM_ShoppingCart->hasBillingMethod()) {
         $OSCOM_Payment = Registry::get('Payment');
         $OSCOM_Payment->load($OSCOM_ShoppingCart->getBillingMethod('id'));
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:55,代码来源:Controller.php

示例15: parse

 public static function parse($data)
 {
     $string = '<table border="0" cellspacing="0" cellpadding="2">';
     $i = 0;
     foreach ($data['data'] as $field) {
         $i++;
         $string .= '  <tr>' . '    <td width="100">' . $field['text'] . ':</td>' . '    <td>' . HTML::inputField('variants[' . $data['group_id'] . '][' . $field['id'] . ']', null, 'id="variants_' . $data['group_id'] . '_' . $i . '"') . '</td>' . '  </tr>';
     }
     $string .= '</table>';
     return $string;
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:11,代码来源:TextField.php


注:本文中的osCommerce\OM\Core\HTML类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。