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


PHP OM\OSCOM类代码示例

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


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

示例1: execute

 function execute()
 {
     global $PHP_SELF, $oscTemplate;
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     if (isset($_SESSION['customer_id'])) {
         // retreive the last x products purchased
         $Qorders = $OSCOM_Db->prepare('select distinct op.products_id from :table_orders o, :table_orders_products op, :table_products p where o.customers_id = :customers_id and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = 1 group by op.products_id order by o.date_purchased desc limit :limit');
         $Qorders->bindInt(':customers_id', $_SESSION['customer_id']);
         $Qorders->bindInt(':limit', MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX);
         $Qorders->execute();
         if ($Qorders->fetch() !== false) {
             $product_ids = [];
             do {
                 $product_ids[] = $Qorders->valueInt('products_id');
             } while ($Qorders->fetch());
             $customer_orders_string = null;
             $Qproducts = $OSCOM_Db->prepare('select products_id, products_name from :table_products_description where products_id in (' . implode(', ', $product_ids) . ') and language_id = :language_id order by products_name');
             $Qproducts->bindInt(':language_id', $OSCOM_Language->getId());
             $Qproducts->execute();
             while ($Qproducts->fetch()) {
                 $customer_orders_string .= '<li><span class="pull-right"><a href="' . OSCOM::link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $Qproducts->valueInt('products_id')) . '"><span class="fa fa-shopping-cart"></span></a></span><a href="' . OSCOM::link('product_info.php', 'products_id=' . $Qproducts->valueInt('products_id')) . '">' . $Qproducts->value('products_name') . '</a></li>';
             }
             ob_start();
             include 'includes/modules/boxes/templates/order_history.php';
             $data = ob_get_clean();
             $oscTemplate->addBlock($data, $this->group);
         }
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:30,代码来源:bm_order_history.php

示例2: getOutput

    function getOutput()
    {
        global $lng;
        if (!isset($lng) || isset($lng) && !is_object($lng)) {
            $lng = new language();
        }
        foreach ($lng->catalog_languages as $lkey => $lvalue) {
            if ($lvalue['id'] == $_SESSION['languages_id']) {
                $language_code = $lkey;
                break;
            }
        }
        $output = '<div class="g-plusone" data-href="' . OSCOM::link('product_info.php', 'products_id=' . $_GET['products_id'], 'NONSSL', false) . '" data-size="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_SIZE) . '" data-annotation="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_ANNOTATION) . '"';
        if (MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_ANNOTATION == 'Inline') {
            $output .= ' data-width="' . (int) MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_WIDTH . '" data-align="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_ALIGN) . '"';
        }
        $output .= '></div>';
        $output .= '<script>
  if ( typeof window.___gcfg == "undefined" ) {
    window.___gcfg = { };
  }

  if ( typeof window.___gcfg.lang == "undefined" ) {
    window.___gcfg.lang = "' . tep_output_string_protected($language_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:tiansiyuan,项目名称:oscommerce2,代码行数:34,代码来源:sb_google_plus_one.php

示例3: execute

 function execute()
 {
     global $new_products_id_in_cart, $currencies, $oscTemplate;
     $cart_contents_string = '';
     if ($_SESSION['cart']->count_contents() > 0) {
         $cart_contents_string = NULL;
         $products = $_SESSION['cart']->get_products();
         for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
             $cart_contents_string .= '<li';
             if (isset($_SESSION['new_products_id_in_cart']) && $new_products_id_in_cart == $products[$i]['id']) {
                 $cart_contents_string .= ' class="newItemInCart"';
             }
             $cart_contents_string .= '>';
             $cart_contents_string .= $products[$i]['quantity'] . '&nbsp;x&nbsp;';
             $cart_contents_string .= '<a href="' . OSCOM::link('product_info.php', 'products_id=' . $products[$i]['id']) . '">';
             $cart_contents_string .= $products[$i]['name'];
             $cart_contents_string .= '</a></li>';
             if (isset($_SESSION['new_products_id_in_cart']) && $new_products_id_in_cart == $products[$i]['id']) {
                 unset($_SESSION['new_products_id_in_cart']);
             }
         }
         $cart_contents_string .= '<li class="text-right"><hr>' . $currencies->format($_SESSION['cart']->show_total()) . '</li>';
     } else {
         $cart_contents_string .= '<p>' . OSCOM::getDef('module_boxes_shopping_cart_box_cart_empty') . '</p>';
     }
     ob_start();
     include 'includes/modules/boxes/templates/shopping_cart.php';
     $data = ob_get_clean();
     $oscTemplate->addBlock($data, $this->group);
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:30,代码来源:bm_shopping_cart.php

示例4: 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

示例5: 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

示例6: getOutput

 function getOutput()
 {
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     $output = '<table class="table table-hover">
                <thead>
                  <tr class="info">
                    <th>' . OSCOM::getDef('module_admin_dashboard_orders_title') . '</th>
                    <th>' . OSCOM::getDef('module_admin_dashboard_orders_total') . '</th>
                    <th>' . OSCOM::getDef('module_admin_dashboard_orders_date') . '</th>
                    <th>' . OSCOM::getDef('module_admin_dashboard_orders_order_status') . '</th>
                  </tr>
                </thead>
                <tbody>';
     $Qorders = $OSCOM_Db->get(['orders o', 'orders_total ot', 'orders_status s'], ['o.orders_id', 'o.customers_name', 'greatest(o.date_purchased, ifnull(o.last_modified, 0)) as date_last_modified', 's.orders_status_name', 'ot.text as order_total'], ['o.orders_id' => ['rel' => 'ot.orders_id'], 'ot.class' => 'ot_total', 'o.orders_status' => ['rel' => 's.orders_status_id'], 's.language_id' => $OSCOM_Language->getId()], 'date_last_modified desc', 6);
     while ($Qorders->fetch()) {
         $output .= '    <tr>
                       <td><a href="' . OSCOM::link(FILENAME_ORDERS, 'oID=' . $Qorders->valueInt('orders_id') . '&action=edit') . '">' . $Qorders->valueProtected('customers_name') . '</a></td>
                       <td>' . strip_tags($Qorders->value('order_total')) . '</td>
                       <td>' . DateTime::toShort($Qorders->value('date_last_modified')) . '</td>
                       <td>' . $Qorders->value('orders_status_name') . '</td>
                     </tr>';
     }
     $output .= '  </tbody>
               </table>';
     return $output;
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:27,代码来源:d_orders.php

示例7: 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(OSCOM::getConfig('dir_root', 'Shop') . 'includes/modules/action_recorder/' . $module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1))) {
                     $this->lang->loadDefinitions('Shop/modules/action_recorder/' . $module);
                     include OSCOM::getConfig('dir_root', 'Shop') . '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

示例8: execute

 public function execute()
 {
     global $login_customer_id;
     $OSCOM_Db = Registry::get('Db');
     if (is_int($login_customer_id) && $login_customer_id > 0) {
         if (SESSION_RECREATE == 'True') {
             tep_session_recreate();
         }
         $Qcustomer = $OSCOM_Db->prepare('select c.customers_firstname, c.customers_default_address_id, ab.entry_country_id, ab.entry_zone_id from :table_customers c left join :table_address_book ab on (c.customers_id = ab.customers_id and c.customers_default_address_id = ab.address_book_id) where c.customers_id = :customers_id');
         $Qcustomer->bindInt(':customers_id', $login_customer_id);
         $Qcustomer->execute();
         $_SESSION['customer_id'] = $login_customer_id;
         $_SESSION['customer_default_address_id'] = $Qcustomer->valueInt('customers_default_address_id');
         $_SESSION['customer_first_name'] = $Qcustomer->value('customers_firstname');
         $_SESSION['customer_country_id'] = $Qcustomer->valueInt('entry_country_id');
         $_SESSION['customer_zone_id'] = $Qcustomer->valueInt('entry_zone_id');
         $Qupdate = $OSCOM_Db->prepare('update :table_customers_info set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1, password_reset_key = null, password_reset_date = null where customers_info_id = :customers_info_id');
         $Qupdate->bindInt(':customers_info_id', $_SESSION['customer_id']);
         $Qupdate->execute();
         // reset session token
         $_SESSION['sessiontoken'] = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand());
         // restore cart contents
         $_SESSION['cart']->restore_contents();
         if (count($_SESSION['navigation']->snapshot) > 0) {
             $origin_href = OSCOM::link($_SESSION['navigation']->snapshot['page'], tep_array_to_string($_SESSION['navigation']->snapshot['get'], array(session_name())), $_SESSION['navigation']->snapshot['mode']);
             $_SESSION['navigation']->clear_snapshot();
             HTTP::redirect($origin_href);
         }
         OSCOM::redirect('index.php');
     }
 }
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:31,代码来源:Process.php

示例9: 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

示例10: __construct

 public function __construct($site = null)
 {
     if (!isset($site)) {
         $site = OSCOM::getSite();
     }
     $this->site = basename($site);
 }
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:7,代码来源:Hooks.php

示例11: 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

示例12: execute

 function execute()
 {
     global $PHP_SELF, $oscTemplate;
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     if (basename($PHP_SELF) == 'index.php') {
         if (isset($_GET['manufacturers_id']) && is_numeric($_GET['manufacturers_id'])) {
             $Qmanufacturer = $OSCOM_Db->prepare('select
                                              m.manufacturers_name,
                                              mi.manufacturers_seo_title
                                            from
                                              :table_manufacturers m,
                                              :table_manufacturers_info mi
                                            where
                                              m.manufacturers_id = mi.manufacturers_id
                                              and m.manufacturers_id = :manufacturers_id
                                              and mi.languages_id = :languages_id');
             $Qmanufacturer->bindInt(':manufacturers_id', $_GET['manufacturers_id']);
             $Qmanufacturer->bindInt(':languages_id', $OSCOM_Language->getId());
             $Qmanufacturer->execute();
             if ($Qmanufacturer->fetch() !== false) {
                 if (tep_not_null($Qmanufacturer->value('manufacturers_seo_title')) && MODULE_HEADER_TAGS_MANUFACTURER_TITLE_SEO_TITLE_OVERRIDE == 'True') {
                     $oscTemplate->setTitle($Qmanufacturer->value('manufacturers_seo_title') . OSCOM::getDef('module_header_tags_manufacturer_seo_separator') . $oscTemplate->getTitle());
                 } else {
                     $oscTemplate->setTitle($Qmanufacturer->value('manufacturers_name') . OSCOM::getDef('module_header_tags_manufacturer_seo_separator') . $oscTemplate->getTitle());
                 }
             }
         }
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:30,代码来源:ht_manufacturer_title.php

示例13: execute

 function execute()
 {
     global $current_category_id, $oscTemplate;
     $OSCOM_Db = Registry::get('Db');
     if (!isset($_GET['products_id'])) {
         if (isset($current_category_id) && $current_category_id > 0) {
             $sql = 'select distinct p.products_id, pd.products_name 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 :category_id in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit :limit';
         } else {
             $sql = 'select distinct p.products_id, pd.products_name 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 :limit';
         }
         $Qbest = $OSCOM_Db->prepare($sql);
         $Qbest->bindInt(':language_id', $_SESSION['languages_id']);
         if (isset($current_category_id) && $current_category_id > 0) {
             $Qbest->bindInt(':category_id', $current_category_id);
         }
         $Qbest->bindInt(':limit', MAX_DISPLAY_BESTSELLERS);
         $Qbest->execute();
         $best = $Qbest->fetchAll();
         if (count($best) >= MIN_DISPLAY_BESTSELLERS) {
             $bestsellers_list = '';
             foreach ($best as $b) {
                 $bestsellers_list .= '<li><a href="' . OSCOM::link('product_info.php', 'products_id=' . $b['products_id']) . '">' . $b['products_name'] . '</a></li>';
             }
             ob_start();
             include 'includes/modules/boxes/templates/best_sellers.php';
             $data = ob_get_clean();
             $oscTemplate->addBlock($data, $this->group);
         }
     }
 }
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:30,代码来源:bm_best_sellers.php

示例14: verify

 public static function verify($plain, $hash)
 {
     $result = false;
     if (strlen($plain) > 0 && strlen($hash) > 0) {
         switch (static::getType($hash)) {
             case 'phpass':
                 if (!class_exists('PasswordHash', false)) {
                     include OSCOM::getConfig('dir_root', 'Shop') . 'includes/third_party/PasswordHash.php';
                 }
                 $hasher = new \PasswordHash(10, true);
                 $result = $hasher->CheckPassword($plain, $hash);
                 break;
             case 'salt':
                 // split apart the hash / salt
                 $stack = explode(':', $hash, 2);
                 if (count($stack) === 2) {
                     $result = md5($stack[1] . $plain) == $stack[0];
                 } else {
                     $result = false;
                 }
                 break;
             default:
                 $result = password_verify($plain, $hash);
                 break;
         }
     }
     return $result;
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:28,代码来源:Hash.php

示例15: getOutput

 function getOutput()
 {
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     $output = '<table class="table table-hover">
                <thead>
                  <tr class="info">
                    <th>' . OSCOM::getDef('module_admin_dashboard_reviews_title') . '</th>
                    <th>' . OSCOM::getDef('module_admin_dashboard_reviews_date') . '</th>
                    <th>' . OSCOM::getDef('module_admin_dashboard_reviews_reviewer') . '</th>
                    <th class="text-right">' . OSCOM::getDef('module_admin_dashboard_reviews_rating') . '</th>
                    <th class="text-right">' . OSCOM::getDef('module_admin_dashboard_reviews_review_status') . '</th>
                  </tr>
                </thead>
                <tbody>';
     $Qreviews = $OSCOM_Db->get(['reviews r', 'products_description pd'], ['r.reviews_id', 'r.date_added', 'pd.products_name', 'r.customers_name', 'r.reviews_rating', 'r.reviews_status'], ['pd.products_id' => ['rel' => 'r.products_id'], 'pd.language_id' => $OSCOM_Language->getId()], 'r.date_added desc', 6);
     while ($Qreviews->fetch()) {
         $output .= '    <tr>
                       <td><a href="' . OSCOM::link(FILENAME_REVIEWS, 'rID=' . $Qreviews->valueInt('reviews_id') . '&action=edit') . '">' . $Qreviews->value('products_name') . '</a></td>
                       <td>' . DateTime::toShort($Qreviews->value('date_added')) . '</td>
                       <td>' . $Qreviews->valueProtected('customers_name') . '</td>
                       <td class="text-right">' . str_repeat('<i class="fa fa-star text-info"></i>', $Qreviews->valueInt('reviews_rating')) . str_repeat('<i class="fa fa-star-o"></i>', 5 - $Qreviews->valueInt('reviews_rating')) . '</td>
                       <td class="text-right"><i class="fa fa-circle ' . ($Qreviews->valueInt('reviews_status') === 1 ? 'text-success' : 'text-danger') . '"></i></td>
                     </tr>';
     }
     $output .= '  </tbody>
               </table>';
     return $output;
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:29,代码来源:d_reviews.php


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