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


PHP get_groups函数代码示例

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


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

示例1: create_group

function create_group(&$error, $group)
{
    if ($group == "") {
        $error = "Groupe nul";
        return;
    }
    if (in_array($group, get_groups($error))) {
        $error = sprintf(_("Group %s already exist"), $group);
        return;
    }
    $ret = xmlCall("base.createGroup", $group);
    if (in_array("samba", $_SESSION["supportModList"])) {
        // FIXME: should be a choice made by the user
        // Samba plugin is enabled, so we make this group a Samba group,
        // but only if we are a PDC.
        $pdc = xmlCall("samba.isPdc", null);
        if ($pdc) {
            xmlCall("samba.makeSambaGroup", array($group));
        }
    }
    if (!isXMLRPCError()) {
        return sprintf(_("Group %s created"), $group);
    } else {
        return;
    }
}
开发者ID:pulse-project,项目名称:pulse,代码行数:26,代码来源:groups-xmlrpc.inc.php

示例2: armar_select_grupos

function armar_select_grupos()
{
    $codigo = "";
    $result = get_groups();
    while ($row = mysql_fetch_array($result)) {
        $codigo = $codigo . "<option value='" . $row[0] . (isset($id_grupo) && $row[0] == $id_grupo ? "' selected>" : "'>") . $row[1] . "</option>";
    }
    return $codigo;
}
开发者ID:eznibe,项目名称:north-stock,代码行数:9,代码来源:item_disponible_valorizado.php

示例3: admin_teams

function admin_teams()
{
    global $db;
    $tpl = new smarty();
    $tpl->assign('lang', get_languages());
    $tpl->assign('groups', get_groups(@(int) $_POST['grID']));
    $bilder = '<option value="">' . NONE . '</option>';
    $pics = scan_dir('images/teams/', true);
    $endungen = array('jpg', 'jpeg', 'JPG', 'JPEG', 'gif', 'GIF', 'PNG', 'png');
    foreach ($pics as $value) {
        if (in_array(substr($value, strrpos($value, '.') + 1), $endungen)) {
            $bilder .= '<option value="' . $value . '">' . $value . '</option>';
        }
    }
    $tpl->assign('pics', $bilder);
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/teams.html');
    $content = ob_get_contents();
    ob_end_clean();
    main_content(TEAMS, $content, '', 1);
    get_teams();
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:22,代码来源:teams.php

示例4: add_filter

    // (you would want to change $post->ID to however you are getting the book order #,
    // but you can see how it works this way with global $post;)
    return 'GI Whiteboard | ';
}
add_filter('wp_title', 'giw_hdr_title');
function get_groups()
{
    global $mySQLi, $group_table;
    $sql = "SELECT * FROM `{$group_table}`;";
    $groups = $mySQLi->get_results($sql);
    foreach ($groups as $row) {
        $out[$row['name']] = $row['level'];
    }
    return $out;
}
$group_info = get_groups();
function get_providers()
{
    global $mySQLi, $user_meta, $users, $group_info;
    $sql = "SELECT * FROM `{$user_meta}` WHERE `meta_key`='groups';";
    $meta = $mySQLi->get_results($sql);
    $out = '';
    foreach ($meta as $row) {
        $user_groups = unserialize($row['meta_value']);
        if (in_array('Providers', $user_groups)) {
            $uid[] = $row['user_id'];
        }
    }
    // loop through each user_meta
    if (isset($uid)) {
        $ids = implode(',', $uid);
开发者ID:mvbaxter,项目名称:gi-whiteboard,代码行数:31,代码来源:index.php

示例5: array_keys

// If some were fetched from memcached, get their artists
if(!empty($Results['matches'])) { // Fetch the artists for groups
	$GroupIDs = array_keys($Results['matches']);
	$Artists = get_artists($GroupIDs);
	
	foreach($Artists as $GroupID=>$Data) {
		if(!empty($Data[1])) {
			$Results['matches'][$GroupID]['Artists']=$Data[1]; // Only use main artists
		}
		ksort($Results['matches'][$GroupID]);
	}
}
*/
// These ones were not found in the cache, run SQL
if(!empty($Results['notfound'])) {
	$SQLResults = get_groups($Results['notfound']);
	
	if(is_array($SQLResults['notfound'])) { // Something wasn't found in the db, remove it from results
		reset($SQLResults['notfound']);
		foreach($SQLResults['notfound'] as $ID) {
			unset($SQLResults['matches'][$ID]);
			unset($Results['matches'][$ID]);
		}
	}
	
	// Merge SQL results with sphinx/memcached results
	foreach($SQLResults['matches'] as $ID=>$SQLResult) {
		$Results['matches'][$ID] = array_merge($Results['matches'][$ID], $SQLResult);
		ksort($Results['matches'][$ID]);
	}
}
开发者ID:4play,项目名称:gazelle2,代码行数:31,代码来源:browse2.php

示例6: get_groups

 }
 if ($_GET['page'] != "rules") {
     if ($row['sitemap']) {
         $allow_sitemap = "<br /><input type=\"checkbox\" name=\"allow_sitemap\" value=\"1\" checked> {$lang['allow_sitemap']}";
     } else {
         $allow_sitemap = "<br /><input type=\"checkbox\" name=\"allow_sitemap\" value=\"1\"> {$lang['allow_sitemap']}";
     }
     if ($row['disable_index']) {
         $disable_index = "<br /><input type=\"checkbox\" name=\"disable_index\" value=\"1\" checked> {$lang['add_disable_index']}";
     } else {
         $disable_index = "<br /><input type=\"checkbox\" name=\"disable_index\" value=\"1\"> {$lang['add_disable_index']}";
     }
 } else {
     $allow_sitemap = "";
 }
 $groups = get_groups(explode(',', $row['grouplevel']));
 if ($row['grouplevel'] == "all") {
     $check_all = "selected";
 } else {
     $check_all = "";
 }
 echo <<<HTML
t<tr><td>{$lang['static_type']}</td><td>{$fix_br}</td></tr>
t<tr><td colspan="2"><div class="hr_line"></div></td></tr>
   <tr>
       <td>&nbsp;</td>
       <td>{$lang['add_metatags']}<a href="#" class="hintanchor" onMouseover="showhint('{$lang['hint_metas']}', this, event, '220px')">[?]</a></td>
   </tr>
   <tr>
       <td height="29" style="padding-left:5px;">{$lang['meta_title']}</td>
       <td><input type="text" name="meta_title" style="width:388px;" class="edit bk" value="{$row['metatitle']}"></td>
开发者ID:Hadryan,项目名称:L2LWEB,代码行数:31,代码来源:static.php

示例7: get_groups

$grouplist = get_groups($uid);
//TODO CHECK GROUPS
if ($uid == $user->data['user_id']) {
    // only edit own profile
    $editprofile = true;
    $owngroupids = get_groupids($grouplist);
} else {
    // check if other user is part of your groups, if not exit
    $groupids = get_groupids($grouplist);
    $memberlist = get_groupmembers($groupids);
    $memberids = get_groupmember_ids($memberlist);
    //printr($memberlist);
    if (!in_array($uid, $memberids)) {
        fatal_error("No permission to view this profile");
    }
    $owngroupids = get_groupids(get_groups($user->data['user_id']));
}
// get message
if (isset($_GET['msg'])) {
    $message = get_msg($_GET['msg']);
}
switch ($mode) {
    case "show":
        $showprofile = true;
        $profile = get_user_profile($uid);
        $acList = get_user_achievements($uid, $owngroupids);
        if ($_SESSION['back'] != $_SERVER['PHP_SELF'] . "?mode=edit" && $_SESSION['back'] != $_SERVER['PHP_SELF'] && !strpos($_SESSION['back'], "expenses.php")) {
            $_SESSION['pshow_back'] = $_SESSION['back'];
            $backurl = $_SESSION['pshow_back'];
        } else {
            $backurl = $_SESSION['pshow_back'];
开发者ID:Whiskey24,项目名称:GoingDutchApi,代码行数:31,代码来源:profile.php

示例8: switch

        <div>
            <?php 
switch ($current_page) {
    // {{{ Dashboard
    case 'dashboard':
        ?>
                        <div>
                            <div style="float:left">
                                <div id="dashboard_chart_div"></div>
                            </div>

                            <div style="float:left; padding-top: 25px;"><strong>Recent Transactions</strong>
                                <div>
                                    Select group:
                                    <?php 
        $groups = get_groups($db);
        echo generate_select('groups', $groups, '', 'group_name', 'group_name');
        ?>
                                    from past:
                                    <select id='select_date_modifier' name='date_modifier'>
                                        <option value="-7 days">1 week</option>
                                        <option value="-14 days">2 weeks</option>
                                    </select>
                                    <input type="submit" id="dashboard_filter_transactions" value="Show" />
                                </div>
                                <table id='dashboard_transactions' class='yui-skin-sam'>
                                </table>
                            </div>
                        </div>
            <?php 
        break;
开发者ID:russgray,项目名称:dosh,代码行数:31,代码来源:dosh.php

示例9: update_user_by_code

function update_user_by_code($details, $user)
{
    $details['code'] = strip_codespaces($details['code']);
    $uid = get_userid_by_code($details['code']);
    $hash = $user->hash_pass($details['password']);
    $sql = "UPDATE users SET username = '" . $details['username'] . "', realname = '" . $details['realname'] . "',\n          password = '{$hash}',  email = '" . $details['email'] . "', activated = '1', reg_date = '" . time() . "' \n          WHERE user_id = {$uid} LIMIT 1";
    $result = mysql_query($sql);
    if ($result) {
        cleanup_register($details['code']);
        $groups = get_groups($uid);
        return $groups;
    }
    return false;
}
开发者ID:Whiskey24,项目名称:GoingDutchApi,代码行数:14,代码来源:functions.php

示例10: IN

	FROM torrents AS t
	WHERE t.GroupID IN(".implode(',',$SnatchedGroupIDs).")
	GROUP BY t.GroupID");

//$DB->query('SELECT * FROM t');

$DB->query("SELECT GroupID FROM t 
		WHERE EncodingList NOT LIKE '%V0 (VBR)%' 
		OR EncodingList NOT LIKE '%V2 (VBR)%' 
		OR EncodingList NOT LIKE '%320%'");

$GroupIDs = $DB->collect('GroupID');

if(count($GroupIDs) == 0) { error('No results found'); }

$Results = get_groups($GroupIDs);

show_header('Transcode Snatches');
?>
<div class="thin">
	<table width="100%">
		<tr class="colhead">
			<td>Torrent</td>
			<td>V2</td>
			<td>V0</td>
			<td>320</td>
		</tr>
<?
$Results = $Results['matches'];
foreach ($Results as $GroupID=>$Group) {
	list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $Torrents, $Artists) = array_values($Group);
开发者ID:4play,项目名称:gazelle2,代码行数:31,代码来源:snatch.php

示例11: connect

    if (!is_capable($can_administrate, $operator)) {
        $errors[] = "You are not allowed to remove groups";
    }
    if (count($errors) == 0) {
        $link = connect();
        perform_query("delete from {$mysqlprefix}chatgroup where groupid = " . intval($groupid), $link);
        perform_query("delete from {$mysqlprefix}chatgroupoperator where groupid = " . intval($groupid), $link);
        perform_query("update {$mysqlprefix}chatthread set groupid = 0 where groupid = " . intval($groupid), $link);
        mysql_close($link);
        header("Location: {$mibewroot}/operator/groups.php");
        exit;
    }
}
function is_online($group)
{
    global $settings;
    return $group['ilastseen'] !== NULL && $group['ilastseen'] < $settings['online_timeout'] ? "1" : "";
}
function is_away($group)
{
    global $settings;
    return $group['ilastseenaway'] !== NULL && $group['ilastseenaway'] < $settings['online_timeout'] ? "1" : "";
}
$page = array();
$link = connect();
$page['groups'] = get_groups($link, true);
mysql_close($link);
$page['canmodify'] = is_capable($can_administrate, $operator);
prepare_menu($operator);
start_html_output();
require '../view/groups.php';
开发者ID:kuell,项目名称:chat,代码行数:31,代码来源:groups.php

示例12: book_entry

        case 'book_entry':
            $myReturn = book_entry($_POST);
            break;
        case 'get_entry':
            $myReturn = get_entry($_POST);
            if (isset($myReturn['minutes_locked']) && $myReturn['minutes_locked'] > 31) {
                $data = array('user_id' => $myReturn['fields']['lock'], 'id' => $myReturn['fields']['id']);
                release_lock($data);
                $myReturn = get_entry($_POST);
            }
            break;
        case 'get_table_data':
            $myReturn = get_table_data($_POST['access_level'] * 1);
            break;
        case 'get_groups':
            $myReturn['groups'] = get_groups($_POST['nuid']);
            break;
        case 'release_lock':
            $myReturn = release_lock($_POST);
            break;
        case 'delete_revisions':
            $myReturn = delete_revisions($_POST);
            break;
        default:
            $myReturn['error'] = 'Not prepared to handle action "' . $_POST['action'] . '"';
            break;
    }
    // end switch
    $myReturn['action'] = $_POST['action'];
    $myReturn['last_accessed'] = log_user_access($_POST);
} else {
开发者ID:mvbaxter,项目名称:gi-whiteboard,代码行数:31,代码来源:ajax_requests.php

示例13: get_photos

     $photos = get_photos(array("user" => $u['userid'], "order" => " date_added DESC", "limit" => config('photo_channel_page')));
     if ($photos) {
         foreach ($photos as $photo) {
             assign('photo', $photo);
             assign('channelPhoto', true);
             $content['html'] .= Fetch("/blocks/photo.html");
         }
         $content['html'] .= '<div align="right" class="clearfix channelAjaxMoreLink photosMoreLink" style="clear:both; display:block;">';
         $content['html'] .= '<a href="' . cblink(array("name" => "user_photos")) . $u['username'] . '">' . lang('more') . '</a> | <a href="' . cblink(array("name" => "user_fav_photos")) . $u['username'] . '">' . lang('Favorites') . '</a>';
         $content['html'] .= '</div>';
     } else {
         $content['html'] = '<div align="center"><em>' . lang('User dont have any photos') . '</em></div>';
     }
     break;
 case "groups":
     $groups = get_groups(array("user" => $u['userid'], "order" => " date_added DESC", "limit" => config('photo_channel_page')));
     if ($groups) {
         foreach ($groups as $group) {
             assign('group', $group);
             assign('channelGroup', true);
             $content['html'] .= Fetch("/blocks/group.html");
         }
     } else {
         $content['html'] = '<div align="center"><em>' . lang('User dont have any groups.') . '</em></div>';
     }
     break;
 case "collections":
     $collections = get_collections(array("user" => $u['userid'], "order" => " date_added DESC", "limit" => config('collection_channel_page')));
     if ($collections) {
         foreach ($collections as $collection) {
             assign('collection', $collection);
开发者ID:yukisky,项目名称:clipbucket,代码行数:31,代码来源:ajax.php

示例14: echofooter

\t\t  <div class="col-lg-10">
\t\t\t<input type="button" onClick="send(); return false;" class="btn btn-green" value="{$lang['btn_send']}">&nbsp;
        <input onClick="preview()" type="button" class="btn btn-gray" value="{$lang['btn_preview']}">
\t\t  </div>
\t\t </div>\t
\t\t
\t</div>
\t
   </div>
</div>\t\t
</form>\t\t
HTML;
    echofooter();
} else {
    echoheader("<i class=\"icon-envelope\"></i>" . $lang['main_newsl'], $lang['header_ne_1']);
    $group_list = get_groups();
    echo <<<HTML
<form method="GET" action="" class="form-horizontal">
<input type="hidden" name="mod" value="newsletter">
<input type="hidden" name="action" value="message">
<div class="box">
  <div class="box-header">
    <div class="title">{$lang['nl_main']}</div>
  </div>
  <div class="box-content">

\t<div class="row box-section">
\t
\t\t<div class="form-group">
\t\t  <label class="control-label col-lg-2">{$lang['nl_type']}</label>
\t\t  <div class="col-lg-10">
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:newsletter.php

示例15: backup_groups_info

function backup_groups_info($bf, $preferences)
{
    global $CFG;
    $status = true;
    $status2 = true;
    //Get groups
    $groups = get_groups($preferences->backup_course);
    //TODO:check.
    //Pring groups header
    if ($groups) {
        //Pring groups header
        fwrite($bf, start_tag("GROUPS", 2, true));
        //Iterate
        foreach ($groups as $group) {
            //Begin group tag
            fwrite($bf, start_tag("GROUP", 3, true));
            //Output group contents
            fwrite($bf, full_tag("ID", 4, false, $group->id));
            ///fwrite ($bf,full_tag("COURSEID",4,false,$group->courseid));
            fwrite($bf, full_tag("NAME", 4, false, $group->name));
            fwrite($bf, full_tag("DESCRIPTION", 4, false, $group->description));
            fwrite($bf, full_tag("ENROLMENTKEY", 4, false, $group->enrolmentkey));
            //TODO:
            fwrite($bf, full_tag("LANG", 4, false, $group->lang));
            fwrite($bf, full_tag("THEME", 4, false, $group->theme));
            fwrite($bf, full_tag("PICTURE", 4, false, $group->picture));
            fwrite($bf, full_tag("HIDEPICTURE", 4, false, $group->hidepicture));
            fwrite($bf, full_tag("TIMECREATED", 4, false, $group->timecreated));
            fwrite($bf, full_tag("TIMEMODIFIED", 4, false, $group->timemodified));
            //Now, backup groups_members, only if users are included
            if ($preferences->backup_users != 2) {
                $status2 = backup_groups_members_info($bf, $preferences, $group->id);
            }
            //End group tag
            fwrite($bf, end_tag("GROUP", 3, true));
        }
        //End groups tag
        $status = fwrite($bf, end_tag("GROUPS", 2, true));
        //Now save group_files
        if ($status && $status2) {
            $status2 = backup_copy_group_files($preferences);
        }
    }
    return $status && $status2;
}
开发者ID:veritech,项目名称:pare-project,代码行数:45,代码来源:backuplib.php


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