當前位置: 首頁>>代碼示例>>PHP>>正文


PHP is_member函數代碼示例

本文整理匯總了PHP中is_member函數的典型用法代碼示例。如果您正苦於以下問題:PHP is_member函數的具體用法?PHP is_member怎麽用?PHP is_member使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了is_member函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct()
 {
     global $globals;
     parent::__construct();
     $this->register_function('list_all_my_groups', 'list_all_my_groups');
     $this->register_modifier('cat_pp', 'cat_pp');
     $this->assign('it_is_xnet', true);
     global $globals;
     $this->assign('is_logged', S::logged());
     if ($globals->asso('id')) {
         $this->assign('asso', $globals->asso());
         $this->setType($globals->asso('cat'));
         $this->assign('is_admin', may_update());
         $this->assign('is_member', is_member());
     }
     if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
         $this->addJsLink('json2.js');
     }
     $this->addJsLink('jquery.xorg.js');
     $this->addJsLink('overlib.js');
     $this->addJsLink('core.js');
     $this->addJsLink('xorg.js');
     if ($globals->core->sentry_js_dsn) {
         $this->addJsLink('raven.min.js');
     }
     $this->setTitle('Les associations polytechniciennes');
 }
開發者ID:Ekleog,項目名稱:platal,代碼行數:27,代碼來源:xnetpage.php

示例2: tags_editpost_end

function tags_editpost_end()
{
    global $mybb, $db, $lang, $templates, $thread, $post, $tags, $tags_value;
    if ($mybb->settings['tags_enabled'] == 0 || tags_in_disforum($thread['fid']) || $mybb->settings['tags_groups'] != -1 && !is_member($mybb->settings['tags_groups'])) {
        return;
    }
    $lang->load('tags');
    if ($thread['firstpost'] != $mybb->get_input('pid', 1)) {
        return;
    }
    $tags_value = $mybb->get_input('tags');
    if (!$tags_value) {
        $bad_tags = tags_getbads(true, false);
        $query = $db->simple_select('tags', '*', "tid='{$thread['tid']}'{$bad_tags}");
        $thread['tags'] = array();
        while ($tag = $db->fetch_array($query)) {
            if (!in_array($tag['name'], $thread['tags']) && $tag['name'] != '') {
                array_push($thread['tags'], $tag['name']);
            }
        }
        $tags_value = implode(',', $thread['tags']);
    }
    $tags_value = htmlspecialchars_uni(tags_string2tag($tags_value));
    eval('$tags = "' . $templates->get('tags_input') . '";');
}
開發者ID:ATofighi,項目名稱:MyBB-Tags,代碼行數:25,代碼來源:editpost.php

示例3: tags_validate

function tags_validate(&$datahandler)
{
    global $mybb, $db, $thread, $lang;
    if ($mybb->settings['tags_enabled'] == 0 || tags_in_disforum($datahandler->fid) || $mybb->settings['tags_groups'] != -1 && !is_member($mybb->settings['tags_groups'])) {
        return;
    }
    $lang->load('tags');
    $mybb->settings['tags_max_thread'] = (int) $mybb->settings['tags_max_thread'];
    if ($mybb->get_input('tags') != '' && ($datahandler->action == 'thread' || is_array($thread) && $datahandler->data['pid'] == $thread['firstpost'])) {
        $tags_value = $mybb->get_input('tags');
        $tags_value = tags_string2tag($tags_value);
        $tags = explode(',', $tags_value);
        if (count($tags) > $mybb->settings['tags_max_thread'] && $mybb->settings['tags_max_thread'] > 0) {
            $lang->many_tags = $lang->sprintf($lang->many_tags, $mybb->settings['tags_max_thread']);
            $datahandler->set_error($lang->many_tags);
            return;
        }
        foreach ($tags as $tag) {
            if (my_strlen($tag) > 0 && my_strlen($tag) < $mybb->settings['tags_minchars']) {
                $datahandler->set_error($lang->tags_too_short);
                return;
            } elseif (my_strlen($tag) > $mybb->settings['tags_maxchars'] && $mybb->settings['tags_maxchars'] > 0) {
                $datahandler->set_error($lang->tags_too_long);
                return;
            }
        }
    }
}
開發者ID:ATofighi,項目名稱:MyBB-Tags,代碼行數:28,代碼來源:datahandler_post.php

示例4: tags_newthread_start

function tags_newthread_start()
{
    global $mybb, $db, $templates, $tags, $tags_value, $lang, $fid;
    if ($mybb->settings['tags_enabled'] == 0 || tags_in_disforum($fid) || $mybb->settings['tags_groups'] != -1 && !is_member($mybb->settings['tags_groups'])) {
        return;
    }
    $lang->load('tags');
    $tags_value = $mybb->get_input('tags');
    $tags_value = htmlspecialchars_uni(tags_string2tag($tags_value));
    eval('$tags = "' . $templates->get('tags_input') . '";');
}
開發者ID:ATofighi,項目名稱:MyBB-Tags,代碼行數:11,代碼來源:newthread.php

示例5: startAvailableAuth

 public function startAvailableAuth()
 {
     if (!S::logged() && Get::has('auth')) {
         if (!$this->start(AUTH_PASSWD)) {
             return false;
         }
     }
     global $globals;
     if (!S::logged() && $globals->xnet->auth_baseurl) {
         // prevent connection to be linked to disconnection
         if (($i = strpos($_SERVER['REQUEST_URI'], 'exit')) !== false) {
             $returl = "http://{$_SERVER['SERVER_NAME']}" . substr($_SERVER['REQUEST_URI'], 0, $i);
         } else {
             $returl = "http://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}";
         }
         $url = $globals->xnet->auth_baseurl;
         $url .= "?session=" . session_id();
         $url .= "&challenge=" . S::v('challenge');
         $url .= "&pass=" . md5(S::v('challenge') . $globals->xnet->secret);
         $url .= "&url=" . urlencode($returl);
         S::set('loginX', $url);
     }
     if (S::logged() && $globals->asso()) {
         $perms = S::v('perms');
         $perms->rmFlag('groupadmin');
         $perms->rmFlag('groupmember');
         $perms->rmFlag('groupannu');
         if (may_update()) {
             $perms->addFlag('groupadmin');
             $perms->addFlag('groupmember');
             $perms->addFlag('groupannu');
         }
         if (is_member()) {
             $perms->addFlag('groupmember');
             if ($globals->asso('pub') != 'private') {
                 $perms->addFlag('groupannu');
             }
         } else {
             if ($globals->asso('pub') == 'public') {
                 $perms->addFlag('groupannu');
             }
         }
         if ($globals->asso('cat') == 'Promotions') {
             $perms->addFlag('groupannu');
         }
         S::set('perms', $perms);
     }
     return true;
 }
開發者ID:Ekleog,項目名稱:platal,代碼行數:49,代碼來源:xnetsession.php

示例6: verify_prefix

 /**
  * Verify thread prefix.
  *
  * @return boolean True when valid, false when not valid.
  */
 function verify_prefix()
 {
     $prefix =& $this->data['prefix'];
     $prefix_cache = build_prefixes();
     // If a valid prefix isn't supplied, don't assign one.
     if (empty($prefix)) {
         $prefix = 0;
     } else {
         $prefix_cache = build_prefixes($prefix);
         if (empty($prefix_cache)) {
             $this->set_error('invalid_prefix');
             return false;
         }
         if ($prefix_cache['groups'] != "-1") {
             if (!empty($this->data['edit_uid'])) {
                 // Post is being edited
                 $user = get_user($this->data['edit_uid']);
             } else {
                 $user = get_user($this->data['uid']);
             }
             if (!is_member($prefix_cache['groups'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups']))) {
                 $this->set_error('invalid_prefix');
                 return false;
             }
         }
         if ($prefix_cache['forums'] != "-1") {
             // Decide whether this prefix can be used in our forum
             $forums = explode(",", $prefix_cache['forums']);
             if (!in_array($this->data['fid'], $forums)) {
                 $this->set_error('invalid_prefix');
                 return false;
             }
         }
     }
     // Does this forum require a prefix?
     $forum = get_forum($this->data['fid']);
     if ($forum['requireprefix'] == 1) {
         $num_prefixes = false;
         // Go through each of our prefixes and decide if there are any possible prefixes to use.
         if (!empty($this->data['edit_uid'])) {
             // Post is being edited
             $user = get_user($this->data['edit_uid']);
         } else {
             $user = get_user($this->data['uid']);
         }
         $prefix_cache = build_prefixes();
         if (!empty($prefix_cache)) {
             foreach ($prefix_cache as $required) {
                 if ($required['forums'] != "-1") {
                     // Decide whether this prefix can be used in our forum
                     $forums = explode(",", $required['forums']);
                     if (!in_array($forum['fid'], $forums)) {
                         continue;
                     }
                 }
                 if ($required['groups'] != "-1") {
                     if (!is_member($required['groups'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups']))) {
                         $num_prefixes = true;
                     }
                 } else {
                     $num_prefixes = true;
                 }
             }
         }
         if ($prefix == 0 && $num_prefixes) {
             $this->set_error('require_prefix');
             return false;
         }
     }
     return true;
 }
開發者ID:olada,項目名稱:mybbintegrator,代碼行數:76,代碼來源:post.php

示例7: ougc_agi_run

function ougc_agi_run(&$post)
{
    global $mybb, $memprofile, $templates;
    $br_postbit = '';
    $br_profile = '<br />';
    $var = 'memprofile';
    $postbit_tmpl = 'member_profile';
    if (!empty($post)) {
        if ($mybb->settings['postlayout'] != 'classic') {
            $br_postbit = '<br />';
            $br_profile = '';
        }
        $var = 'post';
        $postbit_tmpl = $mybb->settings['postlayout'] == 'classic' ? 'postbit_classic' : 'postbit';
    }
    if (empty(${$var}) || $mybb->settings['ougc_agi_groups'] == -1) {
        return;
    }
    ${$var}['ougc_agi'] = '';
    static $uidscache = array();
    if (!isset($uidscache[${$var}['uid']])) {
        ${$var}['additionalgroups'] = explode(',', ${$var}['additionalgroups']);
        if (!empty(${$var}['displaygroup'])) {
            ${$var}['usergroup'] = ${$var}['displaygroup'];
        }
        foreach (${$var}['additionalgroups'] as $key => $val) {
            if ($val == ${$var}['usergroup']) {
                unset(${$var}['additionalgroups'][$key]);
            }
        }
        $uidscache[${$var}['uid']] = (array) ${$var}['additionalgroups'];
    }
    $usergroups = $uidscache[${$var}['uid']];
    $usergroups_cache = $mybb->cache->read('usergroups');
    foreach ($usergroups as $group) {
        if (is_member($mybb->settings['ougc_agi_groups'], array('usergroup' => $group))) {
            continue;
        }
        ${$var}['ougc_agi_' . $group] = '';
        $displaygroup = $usergroups_cache[$group];
        if (!empty($displaygroup['image'])) {
            $language = $mybb->settings['bblanguage'];
            if (!empty($mybb->user['language'])) {
                $language = $mybb->user['language'];
            }
            $usertitle = htmlspecialchars_uni($displaygroup['usertitle'] ? $displaygroup['usertitle'] : $displaygroup['title']);
            $image = str_replace(array('{lang}', '{theme}'), array($language, $theme['imgdir']), htmlspecialchars_uni($displaygroup['image']));
            $tmpl = isset($templates->cache['ougcagi_' . $group]) ? 'ougcagi_' . $group : 'ougcagi';
            if (my_strpos($templates->cache[$postbit_tmpl], '{$' . $var . '[\'ougc_agi_' . $group . '\']}') !== false) {
                eval('$' . $var . '[\'ougc_agi_' . $group . '\'] .= "' . $templates->get($tmpl) . '";');
                continue;
            }
            eval('$' . $var . '[\'ougc_agi\'] .= "' . $templates->get($tmpl) . '";');
        }
    }
}
開發者ID:ambsalinas,項目名稱:anima,代碼行數:56,代碼來源:ougc_agi.php

示例8: purgespammer_show

/**
 * Check whether we can show the Purge Spammer Feature
 *
 * @param int $post_count The users post count
 * @param int $usergroup The usergroup of our user
 * @param int $uid The uid of our user
 * @return boolean Whether or not to show the feature
 */
function purgespammer_show($post_count, $usergroup, $uid)
{
    global $mybb, $cache;
    // only show this if the current user has permission to use it and the user has less than the post limit for using this tool
    $bangroup = $mybb->settings['purgespammerbangroup'];
    $usergroups = $cache->read('usergroups');
    return $mybb->user['uid'] != $uid && is_member($mybb->settings['purgespammergroups']) && !is_super_admin($uid) && !$usergroups[$usergroup]['cancp'] && !$usergroups[$usergroup]['canmodcp'] && !$usergroups[$usergroup]['issupermod'] && (str_replace($mybb->settings['thousandssep'], '', $post_count) <= $mybb->settings['purgespammerpostlimit'] || $mybb->settings['purgespammerpostlimit'] == 0) && !is_member($bangroup, $uid) && !$usergroups[$usergroup]['isbannedgroup'];
}
開發者ID:mainhan1804,項目名稱:xomvanphong,代碼行數:16,代碼來源:functions_user.php

示例9: member_profile_start

 public function member_profile_start()
 {
     global $mybb;
     if (!$mybb->settings['mppermissionsenabled'] || !$mybb->usergroup['canviewprofiles']) {
         return;
     }
     $memprofile = false;
     $uid = $mybb->get_input('uid', 1);
     if ($uid) {
         $memprofile = get_user($uid);
     } elseif ($mybb->user['uid']) {
         $memprofile = $mybb->user;
     }
     if ($mybb->settings['mppermissionsgroups'] != -1 && !is_member($mybb->settings['mppermissionsgroups'], array('usergroup' => $memprofile['usergroup'], 'additionalgroups' => $memprofile['additionalgroups']))) {
         return;
     }
     if (!$memprofile || !$memprofile['myprofilepermissions'] || $mybb->user['uid'] == $memprofile['uid'] || $mybb->usergroup['caneditprofiles']) {
         return;
     }
     require_once MYBB_ROOT . 'inc/functions_modcp.php';
     if (modcp_can_manage_user($memprofile['uid'])) {
         return;
     }
     if ($memprofile['myprofilepermissions'] == 1 || !$memprofile['buddylist'] && !$memprofile['ignorelist']) {
         error_no_permission();
     }
     if (my_strpos(',' . $memprofile['ignorelist'] . ',', ',' . $mybb->user['uid'] . ',') !== false) {
         error_no_permission();
     }
     if (!my_strpos(',' . $memprofile['buddylist'] . ',', ',' . $mybb->user['uid'] . ',') !== false) {
         error_no_permission();
     }
 }
開發者ID:medbenji,項目名稱:MyProfile,代碼行數:33,代碼來源:myprofilepermissions.class.php

示例10: array

     }
     $returndatemonthsel = array();
     foreach (range(1, 12) as $month) {
         $returndatemonthsel[$month] = '';
     }
     $returndatemonthsel[$returndate[1]] = "selected";
     eval("\$awaysection = \"" . $templates->get("usercp_profile_away") . "\";");
 }
 // Custom profile fields baby!
 $altbg = "trow1";
 $requiredfields = $customfields = '';
 $mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
 $pfcache = $cache->read('profilefields');
 if (is_array($pfcache)) {
     foreach ($pfcache as $profilefield) {
         if (!is_member($profilefield['editableby']) || $profilefield['postnum'] && $profilefield['postnum'] > $mybb->user['postnum']) {
             continue;
         }
         $profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
         $profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
         $profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
         $thing = explode("\n", $profilefield['type'], "2");
         $type = $thing[0];
         if (isset($thing[1])) {
             $options = $thing[1];
         } else {
             $options = array();
         }
         $field = "fid{$profilefield['fid']}";
         $select = '';
         if ($errors) {
開發者ID:mainhan1804,項目名稱:xomvanphong,代碼行數:31,代碼來源:usercp.php

示例11: ougc_pages_init

function ougc_pages_init()
{
    global $mybb;
    global $templatelist, $ougc_pages;
    global $category, $page, $session;
    global $plugins;
    /*if(THIS_SCRIPT == 'portal.php' && !$mybb->settings['ougc_pages_portal'] || THIS_SCRIPT == 'pages.php' && $mybb->settings['ougc_pages_portal'])
    	{
    		return;
    	}*/
    if (THIS_SCRIPT != 'pages.php') {
        return;
    }
    if (isset($templatelist)) {
        $templatelist .= ',';
    } else {
        $templatelist = '';
    }
    $templatelist .= 'ougcpages, ougcpages_wrapper, ougcpages_navigation, ougcpages_category_list_item, ougcpages_category_list, ougcpages_navigation_previous, ougcpages_navigation_next';
    $is_page = $mybb->get_input('page') && !empty($mybb->cache->cache['ougc_pages']['pages'][$mybb->get_input('page')]);
    if ($mybb->get_input('page')) {
        if (!empty($mybb->cache->cache['ougc_pages']['pages'][$mybb->get_input('page')])) {
            if ($page = $ougc_pages->get_page_by_url($mybb->get_input('page'))) {
                #$templatelist .= ', ougcpages_page'.$page['pid'];
                if ($category = $ougc_pages->get_category($page['cid'])) {
                    #$templatelist .= ', ougcpages_category'.$category['cid'];
                } else {
                    $ougc_pages->invalid_category = true;
                }
            } else {
                $ougc_pages->invalid_page = true;
            }
        } else {
            $ougc_pages->invalid_page = true;
        }
    } elseif ($mybb->get_input('category')) {
        if ($category = $ougc_pages->get_category_by_url($mybb->get_input('category'))) {
            #$templatelist .= ', ougcpages_category'.$category['cid'];
        } else {
            $ougc_pages->invalid_category = true;
        }
    }
    if (!empty($category)) {
        // Save three queries if no permission check is necessary
        if ($category['groups'] == '') {
            $ougc_pages->no_permission = true;
        } elseif ($category['groups'] != -1) {
            $ougc_pages->init_session();
            is_member($category['groups']) or $ougc_pages->no_permission = true;
        }
    }
    if (!empty($page)) {
        if (!$page['wol'] && !defined('NO_ONLINE')) {
            define('NO_ONLINE', 1);
        }
        // Save three queries if no permission check is necessary
        if (!$ougc_pages->no_permission) {
            if ($page['groups'] == '') {
                $ougc_pages->no_permission = true;
            } elseif ($page['groups'] != -1) {
                $ougc_pages->init_session();
                is_member($page['groups']) or $ougc_pages->no_permission = true;
            }
        }
        if ($page['php'] && !$ougc_pages->no_permission) {
            if ($page['init']) {
                ougc_pages_execute();
            }
            $plugins->add_hook('global_end', 'ougc_pages_execute');
        }
    }
    /*if(THIS_SCRIPT == 'portal.php')
    	{
    		$plugins->add_hook('portal_start', 'ougc_pages_portal_start', 999999999);
    		$plugins->add_hook('portal_end', 'ougc_pages_portal_end');
    	}*/
}
開發者ID:ambsalinas,項目名稱:anima,代碼行數:77,代碼來源:ougc_pages.php

示例12: header

<div class="page">
  <div class="cadre main txtcenter">
    <h2 class="exergue">Administration</h2>
    <?php 
header('Content-type: text/html; charset=utf-8');
/* ici on gère l'affichage général en php  ainsi que les requêtes adressées en n2 et leurs confirmations en n3 */
is_member();
aint_connected();
if (isset($_POST['deleteresa']) && !empty($_POST['resa'])) {
    foreach ($_POST['resa'] as $x => $y) {
        $suppressresa = $pdo->query("DELETE FROM resa WHERE NumResa ='{$y}'");
    }
    echo "<p class='warning'>Suppression bien prise en compte</p>";
}
if (isset($_POST['modif']) && isset($_POST['select_user'])) {
    $user_id = $_POST['select_user'];
    foreach ($_POST['changer'] as $x => $y) {
        if ($x == "DLast_adh") {
            $date = new DateTime($y);
            $y = $date->format('Y-m-d');
        }
        if (!empty($y)) {
            $req5 = $pdo->prepare("UPDATE `users` SET `{$x}` = '{$y}' WHERE `users`.`Num_adh` = {$user_id}");
            $req5->execute();
        }
    }
    echo "<p class='warning'>Modification bien prise en compte</p>";
}
if (isset($_POST['modifcourt']) && isset($_POST['select_court'])) {
    $court_id = $_POST['select_court'];
開發者ID:jenaye,項目名稱:ttcnam,代碼行數:30,代碼來源:admin.php

示例13: header

<?php

require_once 'includes/all.php';
if (!is_logged_in()) {
    header("Location: signin.php");
    exit(0);
}
$db = connect_db();
if (!is_member($db, get_logged_in_user_id(), $_REQUEST['group_id'])) {
    header("Status: 403 Forbidden");
    exit("403 Forbidden");
}
$errors = array();
if (isset($_POST['Day'])) {
    if ($_POST['Day'] === '') {
        $errors[] = "please enter a date";
    } elseif (!preg_match("/^\\d\\d\\d\\d-\\d\\d-\\d\\d\$/", $_POST['Day'])) {
        $errors[] = "date must be in YYYY-MM-DD format";
    }
}
if (isset($_POST['STime'])) {
    if ($_POST['STime'] === '') {
        $errors[] = "please enter a starting time";
    } elseif (!preg_match("/^\\d\\d:\\d\\d\$/", $_POST['STime'])) {
        $errors[] = "starting time must be in HH:MM format";
    }
}
if (isset($_POST['ETime'])) {
    if ($_POST['ETime'] === '') {
        // fine
    } elseif (!preg_match("/^\\d\\d:\\d\\d\$/", $_POST['ETime'])) {
開發者ID:magical,項目名稱:cs290-project,代碼行數:31,代碼來源:EventCreate.php

示例14: array

// Load the theme
// 1. Check cookies
if (!$mybb->user['uid'] && !empty($mybb->cookies['mybbtheme'])) {
    $mybb->user['style'] = (int) $mybb->cookies['mybbtheme'];
}
// 2. Load style
if (isset($mybb->user['style']) && (int) $mybb->user['style'] != 0) {
    $loadstyle = "tid='" . (int) $mybb->user['style'] . "'";
} else {
    $loadstyle = "def='1'";
}
// Load basic theme information that we could be needing.
if ($loadstyle != "def='1'") {
    $query = $db->simple_select('themes', 'name, tid, properties, allowedgroups', $loadstyle, array('limit' => 1));
    $theme = $db->fetch_array($query);
    if (isset($theme['tid']) && !is_member($theme['allowedgroups']) && $theme['allowedgroups'] != 'all') {
        if (isset($mybb->cookies['mybbtheme'])) {
            my_unsetcookie('mybbtheme');
        }
        $loadstyle = "def='1'";
    }
}
if ($loadstyle == "def='1'") {
    if (!$cache->read('default_theme')) {
        $cache->update_default_theme();
    }
    $theme = $cache->read('default_theme');
}
// No theme was found - we attempt to load the master or any other theme
if (!isset($theme['tid']) || isset($theme['tid']) && !$theme['tid']) {
    // Missing theme was from a user, run a query to set any users using the theme to the default
開發者ID:gholol,項目名稱:ToRepublic2.5,代碼行數:31,代碼來源:xmlhttp.php

示例15: verify_style

 /**
  * Verifies if a style is valid for this user or not.
  *
  * @return boolean True when valid, false when invalid.
  */
 function verify_style()
 {
     global $lang;
     $user =& $this->data;
     if ($user['style']) {
         $theme = get_theme($user['style']);
         if (empty($theme) || !is_member($theme['allowedgroups'], $user) && $theme['allowedgroups'] != 'all') {
             $this->set_error('invalid_style');
             return false;
         }
     }
     return true;
 }
開發者ID:mainhan1804,項目名稱:xomvanphong,代碼行數:18,代碼來源:user.php


注:本文中的is_member函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。