• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Core\HTML类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: execute

 public static function execute(ApplicationAbstract $application)
 {
     if (isset($_GET['module']) && !empty($_GET['module'])) {
         $module = HTML::sanitize($_GET['module']);
         if (class_exists('osCommerce\\OM\\Core\\Site\\Shop\\Module\\Payment\\' . $module)) {
             $module = 'osCommerce\\OM\\Core\\Site\\Shop\\Module\\Payment\\' . $module;
             $module = new $module();
             $module->callback();
         }
     }
     exit;
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:12,代码来源:Callback.php


示例17: parse

 public static function parse($data)
 {
     $default_value = null;
     foreach ($data['data'] as $variant) {
         if ($variant['default'] === true) {
             $default_value = (string) $variant['id'];
             break;
         }
     }
     $string = '<table border="0" cellspacing="0" cellpadding="2">' . '  <tr>' . '    <td width="100">' . $data['title'] . ':</td>' . '    <td>' . HTML::radioField('variants[' . $data['group_id'] . ']', $data['data'], $default_value, 'onchange="refreshVariants();" id="variants_' . $data['group_id'] . '"') . '</td>' . '  </tr>' . '</table>';
     return $string;
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:12,代码来源:RadioButton.php


示例18: osc_cfg_set_zone_classes_pull_down_menu

function osc_cfg_set_zone_classes_pull_down_menu($default, $key = null)
{
    $OSCOM_PDO = Registry::get('PDO');
    $name = empty($key) ? 'configuration_value' : 'configuration[' . $key . ']';
    $zone_class_array = array(array('id' => '0', 'text' => OSCOM::getDef('parameter_none')));
    $Qzones = $OSCOM_PDO->query('select geo_zone_id, geo_zone_name from :table_geo_zones order by geo_zone_name');
    $Qzones->execute();
    while ($Qzones->fetch()) {
        $zone_class_array[] = array('id' => $Qzones->valueInt('geo_zone_id'), 'text' => $Qzones->value('geo_zone_name'));
    }
    return HTML::selectMenu($name, $zone_class_array, $default);
}
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:12,代码来源:osc_cfg_set_zone_classes_pull_down_menu.php


示例19: osc_cfg_set_credit_cards_checkbox_field

function osc_cfg_set_credit_cards_checkbox_field($default, $key = null)
{
    $OSCOM_PDO = Registry::get('PDO');
    $name = empty($key) ? 'configuration_value' : 'configuration[' . $key . '][]';
    $cc_array = array();
    $Qcc = $OSCOM_PDO->prepare('select id, credit_card_name from :table_credit_cards where credit_card_status = :credit_card_status order by sort_order, credit_card_name');
    $Qcc->bindInt(':credit_card_status', 1);
    $Qcc->execute();
    while ($Qcc->fetch()) {
        $cc_array[] = array('id' => $Qcc->valueInt('id'), 'text' => $Qcc->value('credit_card_name'));
    }
    return HTML::checkboxField($name, $cc_array, explode(',', $default), null, '<br />');
}
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:13,代码来源:osc_cfg_set_credit_cards_checkbox_field.php


示例20: execute

 public static function execute(ApplicationAbstract $application)
 {
     if (!empty($_GET['shortcut'])) {
         $application = HTML::sanitize($_GET['shortcut']);
         if (OSCOM::siteApplicationExists($application)) {
             if (Dashboard::deleteShortcut($_SESSION[OSCOM::getSite()]['id'], $application)) {
                 $_SESSION[OSCOM::getSite()]['access'] = Access::getUserLevels($_SESSION[OSCOM::getSite()]['id']);
                 Registry::get('MessageStack')->add('header', OSCOM::getDef('ms_success_shortcut_removed'), 'success');
                 OSCOM::redirect(OSCOM::getLink(null, $application));
             }
         }
     }
     OSCOM::redirect(OSCOM::getLink());
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:14,代码来源:RemoveShortcut.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Core\OSCOM类代码示例发布时间:2022-05-23
下一篇:
PHP Core\ApplicationAbstract类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap