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


PHP tep_session_is_registered函数代码示例

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


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

示例1: payment

 function payment($module = '')
 {
     global $payment, $language, $PHP_SELF;
     if (defined('MODULE_PAYMENT_INSTALLED') && tep_not_null(MODULE_PAYMENT_INSTALLED)) {
         // BOF Separate Pricing Per Customer, next line original code
         //       $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
         global $sppc_customer_group_id, $customer_id;
         if (!tep_session_is_registered('sppc_customer_group_id')) {
             $customer_group_id = '0';
         } else {
             $customer_group_id = $sppc_customer_group_id;
         }
         $customer_payment_query = tep_db_query("select IF(c.customers_payment_allowed <> '', c.customers_payment_allowed, cg.group_payment_allowed) as payment_allowed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg where c.customers_id = '" . $customer_id . "' and cg.customers_group_id =  '" . $customer_group_id . "'");
         if ($customer_payment = tep_db_fetch_array($customer_payment_query)) {
             if (tep_not_null($customer_payment['payment_allowed'])) {
                 $temp_payment_array = explode(';', $customer_payment['payment_allowed']);
                 $installed_modules = explode(';', MODULE_PAYMENT_INSTALLED);
                 for ($n = 0; $n < sizeof($installed_modules); $n++) {
                     // check to see if a payment method is not de-installed
                     if (in_array($installed_modules[$n], $temp_payment_array)) {
                         $payment_array[] = $installed_modules[$n];
                     }
                 }
                 // end for loop
                 $this->modules = $payment_array;
             } else {
                 $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
             }
         } else {
             // default
             $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
         }
         // EOF Separate Pricing Per Customer
         $include_modules = array();
         if (tep_not_null($module) && in_array($module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1), $this->modules)) {
             $this->selected_module = $module;
             $include_modules[] = array('class' => $module, 'file' => $module . '.php');
         } else {
             reset($this->modules);
             while (list(, $value) = each($this->modules)) {
                 $class = substr($value, 0, strrpos($value, '.'));
                 $include_modules[] = array('class' => $class, 'file' => $value);
             }
         }
         for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
             include DIR_WS_LANGUAGES . $language . '/modules/payment/' . $include_modules[$i]['file'];
             include DIR_WS_MODULES . 'payment/' . $include_modules[$i]['file'];
             $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
         }
         // if there is only one payment method, select it as default because in
         // checkout_confirmation.php the $payment variable is being assigned the
         // $_POST['payment'] value which will be empty (no radio button selection possible)
         if (tep_count_payment_modules() == 1 && (!isset($GLOBALS[$payment]) || isset($GLOBALS[$payment]) && !is_object($GLOBALS[$payment]))) {
             $payment = $include_modules[0]['class'];
         }
         if (tep_not_null($module) && in_array($module, $this->modules) && isset($GLOBALS[$module]->form_action_url)) {
             $this->form_action_url = $GLOBALS[$module]->form_action_url;
         }
     }
 }
开发者ID:eosc,项目名称:EosC-2.3,代码行数:60,代码来源:payment.php

示例2: execute

 function execute()
 {
     global $cart, $new_products_id_in_cart, $currencies, $oscTemplate;
     $cart_contents_string = '';
     if ($cart->count_contents() > 0) {
         $cart_contents_string = NULL;
         $products = $cart->get_products();
         for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
             $cart_contents_string .= '<li';
             if (tep_session_is_registered('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="' . tep_href_link('product_info.php', 'products_id=' . $products[$i]['id']) . '">';
             $cart_contents_string .= $products[$i]['name'];
             $cart_contents_string .= '</a></li>';
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 tep_session_unregister('new_products_id_in_cart');
             }
         }
         $cart_contents_string .= '<li class="text-right"><hr>' . $currencies->format($cart->show_total()) . '</li>';
     } else {
         $cart_contents_string .= '<p>' . 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:katapofatico,项目名称:Responsive-osCommerce,代码行数:30,代码来源:bm_shopping_cart.php

示例3: getTaxRate

 function getTaxRate($class_id, $country_id = -1, $zone_id = -1)
 {
     // LINE ADDED: Bugfix 0000036
     global $customer_zone_id, $customer_country_id;
     if ($country_id == -1 && $zone_id == -1) {
         if (!tep_session_is_registered('customer_id')) {
             $country_id = STORE_COUNTRY;
             $zone_id = STORE_ZONE;
         } else {
             $country_id = $customer_country_id;
             $zone_id = $customer_zone_id;
         }
     }
     if (isset($this->tax_rates[$class_id][$country_id][$zone_id]['rate']) == false) {
         $tax_query = tep_db_query("select sum(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . (int) $country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . (int) $zone_id . "') and tr.tax_class_id = '" . (int) $class_id . "' group by tr.tax_priority");
         if (tep_db_num_rows($tax_query)) {
             $tax_multiplier = 1.0;
             while ($tax = tep_db_fetch_array($tax_query)) {
                 $tax_multiplier *= 1.0 + $tax['tax_rate'] / 100;
             }
             $tax_rate = ($tax_multiplier - 1.0) * 100;
         } else {
             $tax_rate = 0;
         }
         $this->tax_rates[$class_id][$country_id][$zone_id]['rate'] = $tax_rate;
     }
     return $this->tax_rates[$class_id][$country_id][$zone_id]['rate'];
 }
开发者ID:digideskio,项目名称:oscmax2,代码行数:28,代码来源:tax.php

示例4: getSiteLanguage

function getSiteLanguage($get = null)
{
    $default = array('dir' => 'dutch', 'id' => '1', 'code' => 'nl');
    if (!tep_session_is_registered('language') || isset($_GET['language'])) {
        if (!tep_session_is_registered('language')) {
            tep_session_register('language');
            tep_session_register('languages_id');
            tep_session_register('languages_code');
        }
        include DIR_WS_CLASSES . 'language.php';
        $lng = new language();
        if (isset($_GET['language']) && tep_not_null($_GET['language'])) {
            $lng->set_language($_GET['language']);
        } else {
            $lng->get_browser_language();
            if (empty($lng)) {
                $lng->set_language(DEFAULT_LANGUAGE);
            }
        }
        $default = array('dir' => $lng->language['directory'], 'id' => $lng->language['id'], 'code' => $lng->language['code']);
    }
    if ($get && isset($default[$get])) {
        return $default[$get];
    }
    return $default;
}
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:26,代码来源:functions.php

示例5: execute

 function execute()
 {
     global $HTTP_GET_VARS, $HTTP_POST_VARS, $oscTemplate, $customer_id, $order_id;
     if (tep_session_is_registered('customer_id')) {
         $global_query = tep_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int) $customer_id . "'");
         $global = tep_db_fetch_array($global_query);
         if ($global['global_product_notifications'] != '1') {
             if (isset($HTTP_GET_VARS['action']) && $HTTP_GET_VARS['action'] == 'update') {
                 if (isset($HTTP_POST_VARS['notify']) && is_array($HTTP_POST_VARS['notify']) && !empty($HTTP_POST_VARS['notify'])) {
                     $notify = array_unique($HTTP_POST_VARS['notify']);
                     foreach ($notify as $n) {
                         if (is_numeric($n) && $n > 0) {
                             $check_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $n . "' and customers_id = '" . (int) $customer_id . "' limit 1");
                             if (!tep_db_num_rows($check_query)) {
                                 tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . (int) $n . "', '" . (int) $customer_id . "', now())");
                             }
                         }
                     }
                 }
             }
             $products_displayed = array();
             $products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int) $order_id . "' order by products_name");
             while ($products = tep_db_fetch_array($products_query)) {
                 if (!isset($products_displayed[$products['products_id']])) {
                     $products_displayed[$products['products_id']] = tep_draw_checkbox_field('notify[]', $products['products_id']) . ' ' . $products['products_name'];
                 }
             }
             $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:Sibzsolutions,项目名称:Savostore,代码行数:35,代码来源:cm_cs_product_notifications.php

示例6: output

 public function output($step = 0)
 {
     global $temp_orders_id, $currencies;
     $html = '';
     if (tep_session_is_registered('customer_id')) {
         $amount = $this->calculate_amount();
         if ($amount > 0) {
             if (!empty($temp_orders_id)) {
                 $selected_query = tep_db_query('SELECT value FROM temp_orders_total WHERE class="' . $this->type . '" AND orders_id = "' . $temp_orders_id . '"');
                 $selected = tep_db_fetch_array($selected_query);
             }
             if ($this->config['status'] == 'true') {
                 $html .= '<label class="control-label" for="' . $this->type . '" style="display:block;">';
                 $html .= '<div class="' . $this->type . '_item clearfix">';
                 $html .= '<input type="checkbox" name="' . $this->type . '" value="' . $id . '" id="' . $this->type . '"' . (isset($selected['value']) ? ' checked=checked' : '') . ' />';
                 $html .= '<div class="' . $this->type . '_title">&nbsp; ' . $currencies->format($amount) . ' ' . Translate($this->config['title']) . '</div>';
                 if (!empty($this->config['description'])) {
                     $html .= '<div class="' . $this->type . '_description">&nbsp; ' . Translate($this->config['description']) . '</div>';
                 }
                 $html .= '</div>';
                 $html .= '</label>';
             }
         }
     }
     return $html;
 }
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:26,代码来源:Cadeaubon_module.php

示例7: execute

 function execute()
 {
     global $customer_id, $languages_id, $PHP_SELF, $oscTemplate;
     if (tep_session_is_registered('customer_id')) {
         // retreive the last x products purchased
         $orders_query = tep_db_query("select distinct op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_PRODUCTS . " p where o.customers_id = '" . (int) $customer_id . "' and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = '1' group by products_id order by o.date_purchased desc limit " . MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX);
         if (tep_db_num_rows($orders_query)) {
             $product_ids = '';
             while ($orders = tep_db_fetch_array($orders_query)) {
                 $product_ids .= (int) $orders['products_id'] . ',';
             }
             $product_ids = substr($product_ids, 0, -1);
             $customer_orders_string = '<ul class="list-unstyled">';
             $products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id in (" . $product_ids . ") and language_id = '" . (int) $languages_id . "' order by products_name");
             while ($products = tep_db_fetch_array($products_query)) {
                 $customer_orders_string .= '<li><span class="pull-right"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $products['products_id']) . '"><span class="glyphicon glyphicon-shopping-cart"></span></a></span><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . $products['products_name'] . '</a></li>';
             }
             $customer_orders_string .= '</ul>';
             if ($this->group == 'boxes_footer') {
                 $data = '<div class="col-sm-3 col-lg-2">' . '  <div class="footerbox order-history">' . '    <h2>' . MODULE_BOXES_ORDER_HISTORY_BOX_TITLE . '</h2>';
             } else {
                 $data = '<div class="panel panel-default">' . '  <div class="panel-heading">' . MODULE_BOXES_ORDER_HISTORY_BOX_TITLE . '</div>';
             }
             $data .= '  <div class="panel-body">' . $customer_orders_string . '</div>';
             $data .= '</div>';
             if ($this->group == 'boxes_footer') {
                 $data .= '</div>';
             }
             $oscTemplate->addBlock($data, $this->group);
         }
     }
 }
开发者ID:osc2nuke,项目名称:demobts,代码行数:32,代码来源:bm_order_history.php

示例8: RequireLoginValidForPage

function RequireLoginValidForPage($aRetPage)
{
    global $PHP_SELF, $in_login, $login_id, $aADMPages;
    $aThisPage = basename($PHP_SELF);
    //print( "$login_id<br>" );
    $aRetPage = str_replace($aThisPage, 'default.php', $aRetPage);
    if (empty($in_login)) {
        if (!tep_session_is_registered('login_id')) {
            header('Location: login.php?in_login=yes&retpage=' . urlencode($aRetPage) . "\n");
        } else {
            $aSQL = "select allowed_pages from administrators where ( administrator_id = '{$login_id}' )";
            $aRes = tep_db_query($aSQL);
            if ($aVal = tep_db_fetch_array($aRes)) {
                $aPages = $aVal['allowed_pages'];
                if (trim($aPages != '*')) {
                    $aAllowedPages = explode('|', $aPages);
                    $aCurrentPageBox = $aADMPages[$aThisPage];
                    //print( "$aThisPage, $aCurrentPageBox<br>" );
                    if ($aCurrentPageBox != '*') {
                        if (!in_array($aCurrentPageBox, $aAllowedPages)) {
                            header('Location: login.php?' . urlencode($aRetPage) . "\n");
                        }
                    }
                }
            }
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:osiswebprinter,代码行数:28,代码来源:owp_administrators.php

示例9: execute

 function execute()
 {
     global $cart, $new_products_id_in_cart, $currencies, $oscTemplate;
     $cart_contents_string = '';
     if ($cart->count_contents() > 0) {
         $cart_contents_string = '<ul class="shoppingCartList">';
         $products = $cart->get_products();
         for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
             $cart_contents_string .= '<li';
             if (tep_session_is_registered('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="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">';
             $cart_contents_string .= $products[$i]['name'];
             $cart_contents_string .= '</a></li>';
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 tep_session_unregister('new_products_id_in_cart');
             }
         }
         $cart_contents_string .= '<li class="text-right"><hr>' . $currencies->format($cart->show_total()) . '</li>' . '</ul>';
     } else {
         $cart_contents_string .= '<p>' . MODULE_BOXES_SHOPPING_CART_BOX_CART_EMPTY . '</p>';
     }
     $data = '<div class="panel panel-default">' . '  <div class="panel-heading"><a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . MODULE_BOXES_SHOPPING_CART_BOX_TITLE . '</a></div>' . '  <div class="panel-body">' . $cart_contents_string . '</div>' . '</div>';
     $oscTemplate->addBlock($data, $this->group);
 }
开发者ID:osc2nuke,项目名称:demobts,代码行数:28,代码来源:bm_shopping_cart.php

示例10: isEnabled

 function isEnabled()
 {
     global $cart;
     if (!tep_session_is_registered('customer_id') && $cart->count_contents() > 0 && MODULE_CONTENT_PWA_LOGIN_STATUS == 'True') {
         return $this->enabled;
     }
 }
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:7,代码来源:cm_pwa_login.php

示例11: execute

 function execute()
 {
     global $HTTP_GET_VARS, $customer_id, $PHP_SELF, $request_type, $oscTemplate;
     if (isset($HTTP_GET_VARS['products_id'])) {
         if (tep_session_is_registered('customer_id')) {
             $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . (int) $customer_id . "'");
             $check = tep_db_fetch_array($check_query);
             $notification_exists = $check['count'] > 0 ? true : false;
         } else {
             $notification_exists = false;
         }
         $notif_contents = '';
         if ($notification_exists == true) {
             $notif_contents = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '"><span class="glyphicon glyphicon-remove"></span> ' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY_REMOVE, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a>';
         } else {
             $notif_contents = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '"><span class="glyphicon glyphicon-envelope"></span> ' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a>';
         }
         $data = NULL;
         if ($this->group == 'boxes_product_page') {
             $data .= '<div class="col-sm-4 product_box">';
         }
         $data .= '<div class="panel panel-default">' . '  <div class="panel-heading">' . '<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') . '">' . MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_TITLE . '</a></div>' . '  <div class="panel-body">' . $notif_contents . '</div>' . '</div>';
         if ($this->group == 'boxes_product_page') {
             $data .= '</div>';
         }
         $oscTemplate->addBlock($data, $this->group);
     }
 }
开发者ID:osc2nuke,项目名称:demobts,代码行数:28,代码来源:bm_product_notifications.php

示例12: tep_update_whos_online

function tep_update_whos_online()
{
    global $customer_id;
    if (tep_session_is_registered('customer_id')) {
        $wo_customer_id = $customer_id;
        $customer_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $customer_id . "'");
        $customer = tep_db_fetch_array($customer_query);
        $wo_full_name = $customer['customers_firstname'] . ' ' . $customer['customers_lastname'];
    } else {
        $wo_customer_id = '';
        $wo_full_name = 'Guest';
    }
    $wo_session_id = tep_session_id();
    $wo_ip_address = tep_get_ip_address();
    $wo_last_page_url = tep_db_prepare_input(getenv('REQUEST_URI'));
    $current_time = time();
    $xx_mins_ago = $current_time - 900;
    // remove entries that have expired
    tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where time_last_click < '" . $xx_mins_ago . "'");
    $stored_customer_query = tep_db_query("select session_id from " . TABLE_WHOS_ONLINE . " where session_id = '" . tep_db_input($wo_session_id) . "' limit 1");
    if (tep_db_num_rows($stored_customer_query) > 0) {
        tep_db_query("update " . TABLE_WHOS_ONLINE . " set customer_id = '" . (int) $wo_customer_id . "', full_name = '" . tep_db_input($wo_full_name) . "', ip_address = '" . tep_db_input($wo_ip_address) . "', time_last_click = '" . tep_db_input($current_time) . "', last_page_url = '" . tep_db_input($wo_last_page_url) . "' where session_id = '" . tep_db_input($wo_session_id) . "'");
    } else {
        tep_db_query("insert into " . TABLE_WHOS_ONLINE . " (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url) values ('" . (int) $wo_customer_id . "', '" . tep_db_input($wo_full_name) . "', '" . tep_db_input($wo_session_id) . "', '" . tep_db_input($wo_ip_address) . "', '" . tep_db_input($current_time) . "', '" . tep_db_input($current_time) . "', '" . tep_db_input($wo_last_page_url) . "')");
    }
}
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:26,代码来源:whos_online.php

示例13: userLoginCheck

function userLoginCheck()
{
    global $navigation, $login_account_number;
    if (!tep_session_is_registered('login_account_number') || !tep_not_null($login_account_number)) {
        $navigation->set_snapshot();
        tep_redirect(get_href_link(PAGE_LOGIN, '', 'SSL'));
    }
}
开发者ID:rongandat,项目名称:e-global-cya,代码行数:8,代码来源:security.php

示例14: add_session

 function add_session($class, $message, $type = 'error')
 {
     global $messageToStack;
     if (!tep_session_is_registered('messageToStack')) {
         tep_session_register('messageToStack');
         $messageToStack = array();
     }
     $messageToStack[] = array('class' => $class, 'text' => $message, 'type' => $type);
 }
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:9,代码来源:message_stack.php

示例15: pre_confirmation_check

 function pre_confirmation_check()
 {
     global $cartID, $cart;
     if (empty($cart->cartID)) {
         $cartID = $cart->cartID = $cart->generate_cart_id();
     }
     if (!tep_session_is_registered('cartID')) {
         tep_session_register('cartID');
     }
 }
开发者ID:phpsource,项目名称:gocoin-oscommerce,代码行数:10,代码来源:gocoinpay.php


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