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


PHP OM\HTML类代码示例

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


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

示例1: quote

 function quote($method = '')
 {
     global $order, $shipping_weight, $shipping_num_boxes;
     if (MODULE_SHIPPING_TABLE_MODE == 'price') {
         $order_total = $this->getShippableTotal();
     } else {
         $order_total = $shipping_weight;
     }
     $table_cost = preg_split("/[:,]/", MODULE_SHIPPING_TABLE_COST);
     $size = sizeof($table_cost);
     for ($i = 0, $n = $size; $i < $n; $i += 2) {
         if ($order_total <= $table_cost[$i]) {
             $shipping = $table_cost[$i + 1];
             break;
         }
     }
     if (MODULE_SHIPPING_TABLE_MODE == 'weight') {
         $shipping = $shipping * $shipping_num_boxes;
     }
     $this->quotes = array('id' => $this->code, 'module' => OSCOM::getDef('module_shipping_table_text_title'), 'methods' => array(array('id' => $this->code, 'title' => OSCOM::getDef('module_shipping_table_text_way'), 'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (tep_not_null($this->icon)) {
         $this->quotes['icon'] = HTML::image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:28,代码来源:table.php

示例2: getData

 function getData()
 {
     global $request_type, $oscTemplate;
     $OSCOM_Db = Registry::get('Db');
     $data = '';
     $Qmanufacturers = $OSCOM_Db->query('select manufacturers_id, manufacturers_name from :table_manufacturers order by manufacturers_name');
     $manufacturers = $Qmanufacturers->fetchAll();
     if (!empty($manufacturers)) {
         if (count($manufacturers) <= MAX_DISPLAY_MANUFACTURERS_IN_A_LIST) {
             // Display a list
             $manufacturers_list = '<ul class="nav nav-pills nav-stacked">';
             foreach ($manufacturers as $m) {
                 $manufacturers_name = strlen($m['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN ? substr($m['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $m['manufacturers_name'];
                 if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] == $m['manufacturers_id']) {
                     $manufacturers_name = '<strong>' . $manufacturers_name . '</strong>';
                 }
                 $manufacturers_list .= '<li><a href="' . OSCOM::link('index.php', 'manufacturers_id=' . (int) $m['manufacturers_id']) . '">' . $manufacturers_name . '</a></li>';
             }
             $manufacturers_list .= '</ul>';
             $data = $manufacturers_list;
         } else {
             // Display a drop-down
             $manufacturers_array = array();
             if (MAX_MANUFACTURERS_LIST < 2) {
                 $manufacturers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);
             }
             foreach ($manufacturers as $m) {
                 $manufacturers_name = strlen($m['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN ? substr($m['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $m['manufacturers_name'];
                 $manufacturers_array[] = array('id' => $m['manufacturers_id'], 'text' => $manufacturers_name);
             }
             $data = HTML::form('manufacturers', OSCOM::link('index.php', '', $request_type, false), 'get', null, ['session_id' => true]) . HTML::selectField('manufacturers_id', $manufacturers_array, isset($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : '', 'onchange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '"') . '</form>';
         }
     }
     return $data;
 }
开发者ID:Akofelaz,项目名称:oscommerce2,代码行数:35,代码来源:bm_manufacturers.php

示例3: confirm

 function confirm()
 {
     $OSCOM_Db = Registry::get('Db');
     $Qmail = $OSCOM_Db->get('customers', 'count(*) as count', ['customers_newsletter' => '1']);
     $confirm_string = '<table border="0" cellspacing="0" cellpadding="2">' . "\n" . '  <tr>' . "\n" . '    <td class="main"><font color="#ff0000"><strong>' . OSCOM::getDef('text_count_customers', ['count' => $Qmail->valueInt('count')]) . '</strong></font></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>&nbsp;</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="main"><strong>' . $this->title . '</strong></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>&nbsp;</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="main">' . "\n" . '      <ul class="nav nav-tabs" role="tablist">' . "\n" . '        <li role="presentation" class="active"><a href="#html_preview" aria-controls="html_preview" role="tab" data-toggle="tab">' . OSCOM::getDef('email_type_html') . '</a></li>' . "\n" . '        <li role="presentation"><a href="#plain_preview" aria-controls="plain_preview" role="tab" data-toggle="tab">' . OSCOM::getDef('email_type_plain') . '</a></li>' . "\n" . '      </ul>' . "\n" . '      <div class="tab-content">' . "\n" . '        <div role="tabpanel" class="tab-pane active" id="html_preview">' . "\n" . '          <iframe id="emailHtmlPreviewContent" style="width: 100%; height: 400px; border: 0;"></iframe>' . "\n" . '          <script id="emailHtmlPreview" type="x-tmpl-mustache">' . "\n" . '            ' . HTML::outputProtected($this->content_html) . "\n" . '          </script>' . "\n" . '          <script>' . "\n" . '            $(function() {' . "\n" . '              var content = $(\'<div />\').html($(\'#emailHtmlPreview\').html()).text();' . "\n" . '              $(\'#emailHtmlPreviewContent\').contents().find(\'html\').html(content);' . "\n" . '            });' . "\n" . '          </script>' . "\n" . '        </div>' . "\n" . '        <div role="tabpanel" class="tab-pane" id="plain_preview">' . "\n" . '          ' . nl2br(HTML::outputProtected($this->content)) . "\n" . '        </div>' . "\n" . '      </div>' . "\n" . '    </td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>&nbsp;</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="smallText" align="right">' . HTML::button(OSCOM::getDef('image_send'), 'fa fa-envelope', OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send')) . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'])) . '</td>' . "\n" . '  </tr>' . "\n" . '</table>';
     return $confirm_string;
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:7,代码来源:newsletter.php

示例4: execute

 function execute()
 {
     global $PHP_SELF, $oscTemplate, $categories, $current_category_id;
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     if (basename($PHP_SELF) == 'index.php' && $current_category_id > 0) {
         $Qmeta = $OSCOM_Db->prepare('select
                                    categories_seo_description, categories_seo_keywords
                                  from
                                    :table_categories_description
                                  where
                                    categories_id = :categories_id
                                    and language_id = :language_id');
         $Qmeta->bindInt(':categories_id', $current_category_id);
         $Qmeta->bindInt(':language_id', $OSCOM_Language->getId());
         $Qmeta->execute();
         $meta = $Qmeta->fetch();
         if (tep_not_null($meta['categories_seo_description'])) {
             $oscTemplate->addBlock('<meta name="description" content="' . HTML::output($meta['categories_seo_description']) . '" />' . PHP_EOL, $this->group);
         }
         if (tep_not_null($meta['categories_seo_keywords']) && MODULE_HEADER_TAGS_CATEGORY_SEO_KEYWORDS_STATUS == 'True') {
             $oscTemplate->addBlock('<meta name="keywords" content="' . HTML::output($meta['categories_seo_keywords']) . '" />' . PHP_EOL, $this->group);
         }
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:25,代码来源:ht_category_seo.php

示例5: execute

 function execute()
 {
     global $login_customer_id, $messageStack, $oscTemplate;
     $OSCOM_Db = Registry::get('Db');
     $error = false;
     if (isset($_GET['action']) && $_GET['action'] == 'process' && isset($_POST['formid']) && $_POST['formid'] == $_SESSION['sessiontoken']) {
         $email_address = HTML::sanitize($_POST['email_address']);
         $password = HTML::sanitize($_POST['password']);
         // Check if email exists
         $Qcustomer = $OSCOM_Db->get('customers', ['customers_id', 'customers_password'], ['customers_email_address' => $email_address], null, 1);
         if ($Qcustomer->fetch() === false) {
             $error = true;
         } else {
             // Check that password is good
             if (!Hash::verify($password, $Qcustomer->value('customers_password'))) {
                 $error = true;
             } else {
                 // set $login_customer_id globally and perform post login code in catalog/login.php
                 $login_customer_id = $Qcustomer->valueInt('customers_id');
                 // migrate old hashed password to new php password_hash
                 if (Hash::needsRehash($Qcustomer->value('customers_password'))) {
                     $OSCOM_Db->save('customers', ['customers_password' => Hash::encrypt($password)], ['customers_id' => $login_customer_id]);
                 }
             }
         }
     }
     if ($error == true) {
         $messageStack->add('login', OSCOM::getDef('module_content_login_text_login_error'));
     }
     ob_start();
     include 'includes/modules/content/' . $this->group . '/templates/login_form.php';
     $template = ob_get_clean();
     $oscTemplate->addContent($template, $this->group);
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:34,代码来源:cm_login_form.php

示例6: execute

 function execute()
 {
     global $oscTemplate, $order_id;
     $OSCOM_Db = Registry::get('Db');
     if (isset($_SESSION['customer_id'])) {
         $Qglobal = $OSCOM_Db->get('customers_info', 'global_product_notifications', ['customers_info_id' => $_SESSION['customer_id']]);
         if ($Qglobal->valueInt('global_product_notifications') !== 1) {
             if (isset($_GET['action']) && $_GET['action'] == 'update') {
                 if (isset($_POST['notify']) && is_array($_POST['notify']) && !empty($_POST['notify'])) {
                     $notify = array_unique($_POST['notify']);
                     foreach ($notify as $n) {
                         if (is_numeric($n) && $n > 0) {
                             $Qcheck = $OSCOM_Db->get('products_notifications', 'products_id', ['products_id' => $n, 'customers_id' => $_SESSION['customer_id']], null, 1);
                             if ($Qcheck->fetch() === false) {
                                 $OSCOM_Db->save('products_notifications', ['products_id' => $n, 'customers_id' => $_SESSION['customer_id'], 'date_added' => 'now()']);
                             }
                         }
                     }
                 }
             }
             $products_displayed = array();
             $Qproducts = $OSCOM_Db->get('orders_products', ['products_id', 'products_name'], ['orders_id' => $order_id], 'products_name');
             while ($Qproducts->fetch()) {
                 if (!isset($products_displayed[$Qproducts->valueInt('products_id')])) {
                     $products_displayed[$Qproducts->valueInt('products_id')] = '<div class="form-group">' . '  <label class="control-label col-xs-3">' . $Qproducts->value('products_name') . '</label>' . '  <div class="col-xs-9">' . '    <div class="checkbox">' . '      <label>' . HTML::checkboxField('notify[]', $Qproducts->valueInt('products_id')) . '&nbsp;</label>' . '    </div>' . '  </div>' . '</div>';
                 }
             }
             $products_notifications = implode('<br />', $products_displayed);
             ob_start();
             include DIR_WS_MODULES . 'content/' . $this->group . '/templates/product_notifications.php';
             $template = ob_get_clean();
             $oscTemplate->addContent($template, $this->group);
         }
     }
 }
开发者ID:Akofelaz,项目名称:oscommerce2,代码行数:35,代码来源:cm_cs_product_notifications.php

示例7: execute

 function execute()
 {
     global $oscTemplate;
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     if (isset($_GET['products_id'])) {
         $Qmanufacturer = $OSCOM_Db->prepare('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', $_GET['products_id']);
         $Qmanufacturer->execute();
         if ($Qmanufacturer->fetch() !== false) {
             $manufacturer_info_string = null;
             if (!empty($Qmanufacturer->value('manufacturers_image'))) {
                 $manufacturer_info_string .= '<div>' . HTML::image(OSCOM::linkImage($Qmanufacturer->value('manufacturers_image')), $Qmanufacturer->value('manufacturers_name')) . '</div>';
             }
             if (!empty($Qmanufacturer->value('manufacturers_url'))) {
                 $manufacturer_info_string .= '<div class="text-center"><a href="' . OSCOM::link('redirect.php', 'action=manufacturer&manufacturers_id=' . $Qmanufacturer->valueInt('manufacturers_id')) . '" target="_blank">' . OSCOM::getDef('module_boxes_manufacturer_info_box_homepage', ['manufacturers_name' => $Qmanufacturer->value('manufacturers_name')]) . '</a></div>';
             }
             ob_start();
             include 'includes/modules/boxes/templates/manufacturer_info.php';
             $data = ob_get_clean();
             $oscTemplate->addBlock($data, $this->group);
         }
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:25,代码来源:bm_manufacturer_info.php

示例8: getOutput

    function getOutput()
    {
        $button_height = (int) MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_HEIGHT;
        if (MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ANNOTATION == 'Vertical-Bubble') {
            $button_height = 60;
        }
        $output = '<div class="g-plus" data-action="share" data-href="' . OSCOM::link('product_info.php', 'products_id=' . $_GET['products_id'], false) . '" data-annotation="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ANNOTATION) . '"';
        if ((int) MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_WIDTH > 0) {
            $output .= ' data-width="' . (int) MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_WIDTH . '"';
        }
        $output .= ' data-height="' . $button_height . '" data-align="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ALIGN) . '"></div>';
        $output .= '<script>
  if ( typeof window.___gcfg == "undefined" ) {
    window.___gcfg = { };
  }

  if ( typeof window.___gcfg.lang == "undefined" ) {
    window.___gcfg.lang = "' . HTML::outputProtected($this->lang->get('code')) . '";
  }

  (function() {
    var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
    po.src = \'https://apis.google.com/js/plusone.js\';
    var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>';
        return $output;
    }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:28,代码来源:sb_google_plus_share.php

示例9: execute

 function execute()
 {
     global $login_customer_id, $messageStack, $oscTemplate;
     $OSCOM_Db = Registry::get('Db');
     $error = false;
     if (isset($_GET['action']) && $_GET['action'] == 'process' && isset($_POST['formid']) && $_POST['formid'] == $_SESSION['sessiontoken']) {
         $email_address = HTML::sanitize($_POST['email_address']);
         $password = HTML::sanitize($_POST['password']);
         // Check if email exists
         $Qcustomer = $OSCOM_Db->get('customers', ['customers_id', 'customers_password'], ['customers_email_address' => $email_address], null, 1);
         if ($Qcustomer->fetch() === false) {
             $error = true;
         } else {
             // Check that password is good
             if (!tep_validate_password($password, $Qcustomer->value('customers_password'))) {
                 $error = true;
             } else {
                 // set $login_customer_id globally and perform post login code in catalog/login.php
                 $login_customer_id = $Qcustomer->valueInt('customers_id');
                 // migrate old hashed password to new phpass password
                 if (tep_password_type($Qcustomer->value('customers_password')) != 'phpass') {
                     $OSCOM_Db->save('customers', ['customers_password' => tep_encrypt_password($password)], ['customers_id' => $login_customer_id]);
                 }
             }
         }
     }
     if ($error == true) {
         $messageStack->add('login', MODULE_CONTENT_LOGIN_TEXT_LOGIN_ERROR);
     }
     ob_start();
     include DIR_WS_MODULES . 'content/' . $this->group . '/templates/login_form.php';
     $template = ob_get_clean();
     $oscTemplate->addContent($template, $this->group);
 }
开发者ID:Akofelaz,项目名称:oscommerce2,代码行数:34,代码来源:cm_login_form.php

示例10: substr

 function __construct($module, $user_id = null, $user_name = null)
 {
     global $PHP_SELF;
     $this->lang = Registry::get('Language');
     $module = HTML::sanitize(str_replace(' ', '', $module));
     if (defined('MODULE_ACTION_RECORDER_INSTALLED') && tep_not_null(MODULE_ACTION_RECORDER_INSTALLED)) {
         if (tep_not_null($module) && in_array($module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1), explode(';', MODULE_ACTION_RECORDER_INSTALLED))) {
             if (!class_exists($module)) {
                 if (is_file('includes/modules/action_recorder/' . $module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1))) {
                     $this->lang->loadDefinitions('modules/action_recorder/' . $module);
                     include 'includes/modules/action_recorder/' . $module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1);
                 } else {
                     return false;
                 }
             }
         } else {
             return false;
         }
     } else {
         return false;
     }
     $this->_module = $module;
     if (!empty($user_id) && is_numeric($user_id)) {
         $this->_user_id = $user_id;
     }
     if (!empty($user_name)) {
         $this->_user_name = $user_name;
     }
     $GLOBALS[$this->_module] = new $module();
     $GLOBALS[$this->_module]->setIdentifier();
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:action_recorder.php

示例11: execute

    function execute()
    {
        global $PHP_SELF, $oscTemplate;
        $OSCOM_Db = Registry::get('Db');
        if (tep_not_null(MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_ID)) {
            if (MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_JS_PLACEMENT != 'Header') {
                $this->group = 'footer_scripts';
            }
            $header = '<script>
  var _gaq = _gaq || [];
  _gaq.push([\'_setAccount\', \'' . HTML::output(MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_ID) . '\']);
  _gaq.push([\'_trackPageview\']);' . "\n";
            if (MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_EC_TRACKING == 'True' && basename($PHP_SELF) == 'checkout_success.php' && isset($_SESSION['customer_id'])) {
                $Qorder = $OSCOM_Db->get('orders', ['orders_id', 'billing_city', 'billing_state', 'billing_country'], ['customers_id' => $_SESSION['customer_id']], 'date_purchased desc', 1);
                if ($Qorder->fetch() !== false) {
                    $totals = array();
                    $Qtotals = $OSCOM_Db->get('orders_total', ['value', 'class'], ['orders_id' => $Qorder->valueInt('orders_id')]);
                    while ($Qtotals->fetch()) {
                        $totals[$Qtotals->value('class')] = $Qtotals->value('value');
                    }
                    $header .= '  _gaq.push([\'_addTrans\',
    \'' . $Qorder->valueInt('orders_id') . '\', // order ID - required
    \'' . HTML::output(STORE_NAME) . '\', // store name
    \'' . (isset($totals['ot_total']) ? $this->format_raw($totals['ot_total'], DEFAULT_CURRENCY) : 0) . '\', // total - required
    \'' . (isset($totals['ot_tax']) ? $this->format_raw($totals['ot_tax'], DEFAULT_CURRENCY) : 0) . '\', // tax
    \'' . (isset($totals['ot_shipping']) ? $this->format_raw($totals['ot_shipping'], DEFAULT_CURRENCY) : 0) . '\', // shipping
    \'' . $Qorder->valueProtected('billing_city') . '\', // city
    \'' . $Qorder->valueProtected('billing_state') . '\', // state or province
    \'' . $Qorder->valueProtected('billing_country') . '\' // country
  ]);' . "\n";
                    $Qproducts = $OSCOM_Db->prepare('select op.products_id, pd.products_name, op.final_price, op.products_quantity from :table_orders_products op, :table_products_description pd, :table_languages l where op.orders_id = :orders_id and op.products_id = pd.products_id and pd.language_id = l.languages_id and l.code = :code');
                    $Qproducts->bindInt(':orders_id', $Qorder->valueInt('orders_id'));
                    $Qproducts->bindValue(':code', DEFAULT_LANGUAGE);
                    $Qproducts->execute();
                    while ($Qproducts->fetch()) {
                        $Qcategory = $OSCOM_Db->prepare('select cd.categories_name from :table_categories_description cd, :table_products_to_categories p2c, :table_languages l where p2c.products_id = :products_id and p2c.categories_id = cd.categories_id and cd.language_id = l.languages_id and l.code = :code');
                        $Qcategory->bindInt(':products_id', $Qproducts->valueInt('products_id'));
                        $Qcategory->bindValue(':code', DEFAULT_LANGUAGE);
                        $Qcategory->execute();
                        $header .= '  _gaq.push([\'_addItem\',
    \'' . $Qorder->valueInt('orders_id') . '\', // order ID - required
    \'' . $Qproducts->valueInt('products_id') . '\', // SKU/code - required
    \'' . $Qproducts->valueProtected('products_name') . '\', // product name
    \'' . $Qcategory->valueProtected('categories_name') . '\', // category
    \'' . $this->format_raw($Qproducts->value('final_price')) . '\', // unit price - required
    \'' . $Qproducts->valueInt('products_quantity') . '\' // quantity - required
  ]);' . "\n";
                    }
                    $header .= '  _gaq.push([\'_trackTrans\']); //submits transaction to the Analytics servers' . "\n";
                }
            }
            $header .= '  (function() {
    var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
    ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';
    var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>' . "\n";
            $oscTemplate->addBlock($header, $this->group);
        }
    }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:60,代码来源:ht_google_analytics.php

示例12: execute

 function execute()
 {
     global $PHP_SELF, $oscTemplate, $Qproduct, $product_exists;
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     if (isset($_GET['products_id'])) {
         if (isset($Qproduct) && $product_exists === true) {
             $Qmeta = $OSCOM_Db->prepare('select
                                      pd.products_seo_description,
                                      pd.products_seo_keywords
                                    from
                                      :table_products p,
                                      :table_products_description pd
                                    where
                                      p.products_status = :products_status
                                      and p.products_id = :products_id
                                      and pd.products_id = p.products_id
                                      and pd.language_id = :language_id');
             $Qmeta->bindInt(':products_status', 1);
             $Qmeta->bindInt(':products_id', $_GET['products_id']);
             $Qmeta->bindInt(':language_id', $OSCOM_Language->getId());
             $Qmeta->execute();
             $meta = $Qmeta->fetch();
             if (tep_not_null($meta['products_seo_description'])) {
                 $oscTemplate->addBlock('<meta name="description" content="' . HTML::output($meta['products_seo_description']) . '" />' . PHP_EOL, $this->group);
             }
             if (tep_not_null($meta['products_seo_keywords']) && MODULE_HEADER_TAGS_PRODUCT_META_KEYWORDS_STATUS != 'Search') {
                 $oscTemplate->addBlock('<meta name="keywords" content="' . HTML::output($meta['products_seo_keywords']) . '" />' . PHP_EOL, $this->group);
             }
         }
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:32,代码来源:ht_product_meta.php

示例13: execute

 function execute()
 {
     global $request_type, $oscTemplate;
     $form_output = HTML::form('quick_find', OSCOM::link('advanced_search_result.php', '', $request_type, false), 'get', null, ['session_id' => true]) . '<div class="input-group">' . HTML::inputField('keywords', '', 'required aria-required="true" placeholder="' . TEXT_SEARCH_PLACEHOLDER . '"', 'search') . '<span class="input-group-btn"><button type="submit" class="btn btn-search"><i class="glyphicon glyphicon-search"></i></button></span></div>' . HTML::hiddenField('search_in_description', '0') . '</form>';
     ob_start();
     include 'includes/modules/boxes/templates/search.php';
     $data = ob_get_clean();
     $oscTemplate->addBlock($data, $this->group);
 }
开发者ID:Akofelaz,项目名称:oscommerce2,代码行数:9,代码来源:bm_search.php

示例14: getOutput

    function getOutput()
    {
        $OSCOM_Db = Registry::get('Db');
        $days = array();
        for ($i = 0; $i < 7; $i++) {
            $days[date('Y-m-d', strtotime('-' . $i . ' days'))] = 0;
        }
        $Qorders = $OSCOM_Db->query('select date_format(customers_info_date_account_created, "%Y-%m-%d") as dateday, count(*) as total from :table_customers_info where date_sub(curdate(), interval 7 day) <= customers_info_date_account_created group by dateday');
        while ($Qorders->fetch()) {
            $days[$Qorders->value('dateday')] = $Qorders->value('total');
        }
        $days = array_reverse($days, true);
        $chart_label = HTML::output(OSCOM::getDef('module_admin_dashboard_total_customers_chart_link'));
        $chart_label_link = OSCOM::link(FILENAME_CUSTOMERS);
        $data_labels = json_encode(array_keys($days));
        $data = json_encode(array_values($days));
        $output = <<<EOD
<h5 class="text-center"><a href="{$chart_label_link}">{$chart_label}</a></h5>
<div id="d_total_customers"></div>
<script>
\$(function() {
  var data = {
    labels: {$data_labels},
    series: [ {$data} ]
  };

  var options = {
    fullWidth: true,
    height: '200px',
    showPoint: false,
    showArea: true,
    axisY: {
      labelInterpolationFnc: function skipLabels(value, index) {
        return index % 2  === 0 ? value : null;
      }
    }
  }

  var chart = new Chartist.Line('#d_total_customers', data, options);

  chart.on('draw', function(context) {
    if (context.type === 'line') {
      context.element.attr({
        style: 'stroke: green;'
      });
    } else if (context.type === 'area') {
      context.element.attr({
        style: 'fill: green;'
      });
    }
  });
});
</script>
EOD;
        return $output;
    }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:56,代码来源:d_total_customers.php

示例15: getImage

 public function getImage($language_code, $width = null, $height = null)
 {
     if (!isset($width) || !is_int($width)) {
         $width = 16;
     }
     if (!isset($height) || !is_int($height)) {
         $height = 12;
     }
     return HTML::image(OSCOM::link('Shop/public/third_party/flag-icon-css/flags/4x3/' . $this->get('image', $language_code) . '.svg', null, false), $this->get('name', $language_code), $width, $height);
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:10,代码来源:Language.php


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