• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP is_member_of函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: build_ranks

function &fetch_rank(&$userinfo)
{
    global $vbulletin;
    if (!is_array($vbulletin->ranks)) {
        // grab ranks since we didn't include 'ranks' in $specialtemplates
        $vbulletin->ranks =& build_ranks();
    }
    $doneusergroup = array();
    $userrank = '';
    foreach ($vbulletin->ranks as $rank) {
        $displaygroupid = empty($userinfo['displaygroupid']) ? $userinfo['usergroupid'] : $userinfo['displaygroupid'];
        if ($userinfo['posts'] >= $rank['m'] and (!isset($doneusergroup["{$rank['u']}"]) or $doneusergroup["{$rank['u']}"] === $rank['m']) and ($rank['u'] > 0 and is_member_of($userinfo, $rank['u'], false) and (empty($rank['d']) or $rank['u'] == $displaygroupid) or $rank['u'] == 0 and (empty($rank['d']) or empty($userrank)))) {
            if (!empty($userrank) and $rank['s']) {
                $userrank .= '<br />';
            }
            $doneusergroup["{$rank['u']}"] = $rank['m'];
            for ($x = $rank['l']; $x--; $x > 0) {
                if (empty($rank['t'])) {
                    $userrank .= "<img src=\"{$rank['i']}\" alt=\"\" border=\"\" />";
                } else {
                    $userrank .= $rank['i'];
                }
            }
        }
    }
    return $userrank;
}
开发者ID:holandacz,项目名称:nb4,代码行数:27,代码来源:functions_ranks.php


示例2: post_thanks_off

function post_thanks_off($forumid = 0, $postinfo = array(), $threadfirstpostid = 0, $this_script = '')
{
    global $vbulletin;
    ($hook = vBulletinHook::fetch_hook('post_thanks_function_post_thanks_off_start')) ? eval($hook) : false;
    if (!$vbulletin->options['post_thanks_on_off'] || $forumid == 0 || post_thanks_in_array($forumid, $vbulletin->options['post_thanks_forum_off'])) {
        return true;
    }
    if ($vbulletin->options['post_thanks_forum_first_all'] && !($postinfo['postid'] == $threadfirstpostid) || post_thanks_in_array($forumid, $vbulletin->options['post_thanks_forum_first']) && !($postinfo['postid'] == $threadfirstpostid)) {
        return true;
    }
    if (!($this_script == 'showthread' || $this_script == 'showpost' || $this_script == '')) {
        return true;
    }
    if ($vbulletin->options['post_thanks_usergroup_getting']) {
        if (is_member_of($postinfo, explode("|", $vbulletin->options['post_thanks_usergroup_getting']))) {
            return true;
        }
    }
    if ($vbulletin->options['post_thanks_user_getting']) {
        if (in_array($postinfo['userid'], explode("|", $vbulletin->options['post_thanks_user_getting']))) {
            return true;
        }
    }
    ($hook = vBulletinHook::fetch_hook('post_thanks_function_post_thanks_off_end')) ? eval($hook) : false;
    return false;
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:26,代码来源:functions_post_thanks.php


示例3: getSkimClass

 function getSkimClass($userinfo)
 {
     global $vbulletin;
     static $skimLinksDisableUsergroups = null;
     static $skimWordsDisableUserGroups = null;
     if ($skimLinksDisableUsergroups === null) {
         $skimLinksDisableUsergroups = json_decode($vbulletin->options['skimlinks_disable_groups_parse']);
     }
     if ($skimWordsDisableUserGroups === null) {
         $skimWordsDisableUserGroups = json_decode($vbulletin->options['skimwords_disable_groups_parse']);
     }
     $skimLinks = false;
     $skimWords = false;
     if (empty($skimLinksDisableUsergroups) || !is_member_of($userinfo, $skimLinksDisableUsergroups)) {
         $skimLinks = true;
     }
     if (empty($skimWordsDisableUserGroups) || !is_member_of($userinfo, $skimWordsDisableUserGroups)) {
         $skimWords = true;
     }
     if ($skimLinks and $skimWords) {
         return '';
     } else {
         if ($skimLinks) {
             return 'noskimwords';
         } else {
             if ($skimWords) {
                 return 'noskimlinks';
             } else {
                 return 'noskim';
             }
         }
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:33,代码来源:postbit_display_complete.php


示例4: kBankHide

 function kBankHide(&$registry)
 {
     //create new object
     if (is_object($registry)) {
         $this->registry =& $registry;
     } else {
         trigger_error("vB_Database::Registry object is not an object", E_USER_ERROR);
     }
     //Check if user is banned
     $is_banned = !($this->registry->usergroupcache[$this->registry->userinfo['usergroupid']]['genericoptions'] & $this->registry->bf_ugp_genericoptions['isnotbannedgroup']) ? true : false;
     if (is_member_of($this->registry->userinfo, 3, 4) or $is_banned or THIS_SCRIPT == 'misc') {
         $this->settings['banned'] = true;
     }
     //Check if we need to use html version
     if (in_array(THIS_SCRIPT, array('ajax', 'editpost', 'misc', 'newthread', 'newreply', 'printthread', 'showpost', 'showthread'))) {
         $this->settings['dohtml'] = true;
         //Let's use html!
     } else {
         $this->settings['dohtml'] = false;
         //Plain text only
     }
     if (isset($this->registry->kbank['hide']['shortcut'])) {
         foreach ($this->tags as $key => $tag) {
             if (strtolower($tag['name']) == strtolower($this->registry->kbank['hide']['shortcut'])) {
                 $this->tags[$key]['name'] .= '|HIDE';
             }
         }
     }
     //Prepair regex
     foreach ($this->tags as $key => $tag) {
         $this->tags[$key]['regex'] = "\\[({$tag['name']})(=(&quot;|\"|'|)?([0-9]+)\\3)?\\]((.|\r|\n)*)\\[\\/\\1\\]";
         //$this->tags[$key]['regex_close'] = "\[\/($tag[name])\]"; - not needed
         $this->tags[$key]['regex_open'] = "\\[({$tag['name']})(=(&quot;|\"|'|)?([0-9]+)\\3)?\\]";
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:35,代码来源:hide_functions.php


示例5: fu_user_can_be_frozen

/**
 * Check main user group and plugin settings
 * Note: Also used as condition for showing "Freeze account" button
 *
 */
function fu_user_can_be_frozen($user_info)
{
    global $vbulletin;
    if (is_member_of($user_info, unserialize($vbulletin->options['fu_source_groups'])) and 0 < $vbulletin->options['fu_frozen_group']) {
        return true;
    }
    return false;
}
开发者ID:rcdesign-cemetery,项目名称:vb-freeze_users,代码行数:13,代码来源:functions_freeze_users.php


示例6: has_vote_permission

 /**
  * Check if user is able to vote/remove votes
  *
  * @return bool
  */
 public function has_vote_permission()
 {
     $banned_group = unserialize($this->registry->options['vbv_grp_banned']);
     $disabled_group = unserialize($this->registry->options['vbv_grp_disable']);
     $readonly_group = unserialize($this->registry->options['vbv_grp_read_only']);
     if (is_member_of($this->registry->userinfo, $banned_group) or is_member_of($this->registry->userinfo, $disabled_group) or is_member_of($this->registry->userinfo, $readonly_group)) {
         return false;
     }
     return true;
 }
开发者ID:rcdesign-cemetery,项目名称:vb-votes,代码行数:15,代码来源:class_votes.php


示例7: CheckMrgDPEnabled

/**
 * 
 *  Check if module should be ON
 * 
 */
function CheckMrgDPEnabled()
{
    global $vbulletin, $foruminfo, $mrgdp_enable, $mrgdp_timespan;
    if (!$vbulletin->userinfo) {
        return false;
    }
    // Module is enabled by default
    $mrgdp_enable = true;
    // set timespan
    $mrgdp_timespan = $vbulletin->options['mrgdp_timespan'];
    // check ignore groups
    $mrgdp_ignore_groups = unserialize($vbulletin->options['mrgdp_ignore_groups']);
    if (is_member_of($vbulletin->userinfo, $mrgdp_ignore_groups)) {
        $mrgdp_enable = false;
    }
    if ($mrgdp_enable and is_array($foruminfo)) {
        $mrgdp_this_forum = explode(',', $foruminfo['parentlist']);
        // check enabled forums if it is not empty
        $mrgdp_enable_forums = trim($vbulletin->options['mrgdp_enable_forums']);
        if (!empty($mrgdp_enable_forums)) {
            // default value
            $mrgdp_enable = false;
            $mrgdp_forums = explode(',', $mrgdp_enable_forums);
            foreach ($mrgdp_forums as &$mrgdp_forumid) {
                if (in_array(intval($mrgdp_forumid), $mrgdp_this_forum)) {
                    $mrgdp_enable = true;
                    break;
                }
            }
            unset($mrgdp_forums);
        }
        unset($mrgdp_enable_forums);
        if ($mrgdp_enable) {
            // check ignore forums
            $mrgdp_ignore_forums = trim($vbulletin->options['mrgdp_ignore_forums']);
            if (!empty($mrgdp_ignore_forums)) {
                $mrgdp_forums = explode(',', $mrgdp_ignore_forums);
                foreach ($mrgdp_forums as &$mrgdp_forumid) {
                    if (in_array(intval($mrgdp_forumid), $mrgdp_this_forum)) {
                        $mrgdp_enable = false;
                        break;
                    }
                }
                unset($mrgdp_forums);
            }
            unset($mrgdp_ignore_forums);
        }
        unset($mrgdp_this_forum);
    }
    return $mrgdp_enable;
}
开发者ID:rcdesign-cemetery,项目名称:vb-merge_doubleposts,代码行数:56,代码来源:functions_mergedoubleposts.php


示例8: get_system_list

function get_system_list($access = "", $current = 0, $maxwidth = 50)
{
    global $dbconn;
    global $session, $roles;
    $system_id_list = "";
    function int_val(&$item)
    {
        $item = strval(intval($item));
    }
    if (is_array($current)) {
        array_walk($current, 'int_val');
    } else {
        $current = intval("{$current}");
    }
    $query = "SELECT work_system.system_id, system_desc ";
    $query .= "FROM work_system WHERE active ";
    if ($access != "" && !is_member_of('Admin', 'Support')) {
        $query .= " AND EXISTS (SELECT system_usr.system_id FROM system_usr WHERE system_usr.system_id=work_system.system_id";
        $query .= " AND user_no={$session->user_no} ";
        $query .= " AND role~*'[{$access}]') ";
    }
    if (is_array($current)) {
        $query .= " OR work_system.system_id IN (" . implode(",", $current) . ") ";
    } else {
        if ($current != "") {
            $query .= " OR work_system.system_id={$current}";
        }
    }
    $query .= " ORDER BY LOWER(system_desc);";
    $rid = awm_pgexec($dbconn, $query);
    if (!$rid) {
        return;
    }
    if (pg_NumRows($rid) > 0) {
        // Build table of systems found
        $rows = pg_NumRows($rid);
        for ($i = 0; $i < $rows; $i++) {
            $system_id = pg_Fetch_Object($rid, $i);
            $system_id_list .= "<option value=\"" . urlencode($system_id->system_id) . "\"";
            if (is_array($current) && in_array($system_id->system_id, $current, true) || "{$system_id->system_id}" == "{$current}") {
                $system_id_list .= " SELECTED";
            }
            $system_id->system_desc = substr($system_id->system_desc, 0, $maxwidth);
            $system_id_list .= ">{$system_id->system_desc}</option>\n";
        }
    }
    return $system_id_list;
}
开发者ID:Br3nda,项目名称:wrms,代码行数:48,代码来源:system-list.php


示例9: disableSkimProduct

/**
 * Skimlinks vBulletin Plugin
 *
 * @author Skimlinks
 * @version 2.0.7
 * @copyright © 2011 Skimbit Ltd.
 */
function disableSkimProduct($product, $threadinfo)
{
    global $vbulletin;
    if ($threadinfo['lastpost'] > TIMENOW - 86400 * $vbulletin->options["{$product}_thread_age_limit"]) {
        return 'true';
    }
    $disableForum = json_decode($vbulletin->options["{$product}_disable_forums"]);
    if (is_array($disableForum) and in_array($threadinfo['forumid'], $disableForum)) {
        return 'true';
    }
    $disabledGroups = json_decode($vbulletin->options["{$product}_disable_groups"]);
    if (is_array($disabledGroups) and is_member_of($vbulletin->userinfo, $disabledGroups)) {
        return 'true';
    }
    return 'false';
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:23,代码来源:showthread_complete.php


示例10: fetch_relevant_notice_ids

/**
* Fetches the IDs of the notices to display on a particular page.
*
* @return	array	Array of IDs to display
*/
function fetch_relevant_notice_ids()
{
	global $vbulletin, $vbphrase, $foruminfo, $threadinfo, $postinfo;


	$forum_pages = array('poll', 'editpost', 'threadrate', 'postings', 'showthread', 'newthread', 'forumdisplay', 'newreply', 'threadtag', 'inlinemod', 'announcement', 'showpost');

	$ignore_np_notices = isset($_COOKIE[COOKIE_PREFIX . 'np_notices_displayed']) ? explode(',', $_COOKIE[COOKIE_PREFIX . 'np_notices_displayed']) : array();
	$display_notices = array();
	$vbulletin->np_notices_displayed = array();

	($hook = vBulletinHook::fetch_hook('notices_check_start')) ? eval($hook) : false;

	foreach ($vbulletin->noticecache AS $noticeid => $notice)
	{
		foreach ($notice AS $criteriaid => $conditions)
		{
			switch ($criteriaid)
			{
				case 'persistent':
				{
					if ($conditions == 0 AND in_array($noticeid, $ignore_np_notices)) // session cookie set in print_output()
					{
						continue 3;
					}
					break;
				}
				case 'dismissible':
				{
					if (in_array($noticeid, fetch_dismissed_notices()))
					{
						continue 3;
					}
					break;
				}
				/*case 'notice_x_not_displayed': // this is now handled differently - see $remove_display_notices below
				{
					if (in_array(intval($conditions[0]), $display_notices))
					{
						continue 3;
					}
					break;
				}*/
				case 'in_usergroup_x':
				{
					if (!is_member_of($vbulletin->userinfo, intval($conditions[0])))
					{
						continue 3;
					}
					break;
				}
				case 'not_in_usergroup_x':
				{
					if (is_member_of($vbulletin->userinfo, intval($conditions[0])))
					{
						continue 3;
					}
					break;
				}
				case 'browsing_forum_x':
				{
					if ($foruminfo['forumid'] != intval($conditions[0]) OR !in_array(THIS_SCRIPT, $forum_pages))
					{
						continue 3;
					}
					break;
				}
				case 'browsing_forum_x_and_children':
				{
					if (!in_array(THIS_SCRIPT, $forum_pages) OR !in_array(intval($conditions[0]), explode(',', $foruminfo['parentlist'])))
					{
						continue 3;
					}
					break;
				}
				case 'no_visit_in_x_days':
				{
					if ($vbulletin->userinfo['lastvisit'] > TIMENOW - $conditions[0] * 86400)
					{
						continue 3;
					}
					break;
				}
				case 'has_never_posted':
				{
					if ($vbulletin->userinfo['lastpost'] > 0)
					{
						continue 3;
					}
					break;
				}
				case 'no_posts_in_x_days':
				{
					if ($vbulletin->userinfo['lastpost'] == 0 OR $vbulletin->userinfo['lastpost'] > TIMENOW - $conditions[0] * 86400)
					{
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:functions_notice.php


示例11: define

}
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
// ################## Begin 'do' Branching ###################
// set default branch action
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'manage';
}
// ###################### Start Manage #######################
if ($_REQUEST['do'] == 'manage') {
    $vbulletin->input->clean_gpc('r', 'u', TYPE_UINT);
    // get bounced user info
    $buser = $db->query_first("\n\t\t\tSELECT * FROM " . TABLE_PREFIX . "user\n\t\t\tWHERE userid = " . $vbulletin->GPC['u'] . "\n\t");
    // Do a safety check to make sure managed member is not an Admin, supermoderator, or Moderator
    if (is_member_of($buser['usergroupid'], 5, 6, 7)) {
        // Exit script
        define('CP_REDIRECT', 'user.php?do=modify');
        print_stop_message('anti_member_x_is_in_a_protected_usergroup', $buser['username']);
        exit;
    }
    // if buser's ezb_oldugid is == 0 then this is first time buser has bounced
    if ($buser['ezb_oldugid'] == 0) {
        if ($vbulletin->options['ezb_updateusergroup'] == true) {
            // Save Member's Original UsergroupID
            $vbulletin->db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "user\n\t\t\t\tSET ezb_oldugid = " . $buser['usergroupid'] . "\n\t\t\t\tWHERE userid = " . $buser['userid'] . "\n\t\t\t");
            // Update usergroupid
            $vbulletin->db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "user \n\t\t\t\tSET usergroupid\t= '" . $vbulletin->options['ezb_newusergroupid'] . "'\n\t\t\t\tWHERE userid\t= " . $buser['userid'] . "\t\n\t\t\t");
        }
        // Update Receive Email from Administrators to NO ( UPDATE user SET options = options + 16 WHERE NOT (options & 16) )
        $vbulletin->db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "user \n\t\t\tSET options = options - 16 \n\t\t\tWHERE options & 16 AND userid = " . $buser['userid'] . "\n\t\t");
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:ezbounce.php


示例12: eval

 if (!is_member_of($vbulletin->userinfo, $vbulletin->kbank['MemberGroupIDs']) and !is_member_of($vbulletin->userinfo, $vbulletin->kbank['BankRuptGroupID']) or calcMonthlyTaxPayTime($vbulletin->userinfo, 'next', 1) > TIMENOW) {
     eval(standard_error(fetch_error('kbank_tax_not_require')));
 }
 if (!$autodirected) {
     $vbulletin->input->clean_array_gpc('p', array('referer' => TYPE_STR, 'choice' => TYPE_STR));
     $tax = calcMonthlyTax($vbulletin->userinfo);
 } else {
     //Autodirect from 'tax'
     $vbulletin->GPC['choice'] = 'pay';
 }
 $vbulletin->url = $vbulletin->GPC['referer'];
 switch ($vbulletin->GPC['choice']) {
     case 'pay':
         transferMoney($vbulletin->userinfo['userid'], 0, $tax['tax_total'], 'tax_' . TIMENOW, null, true, false, KBANK_NO_TAX, true, 0, array('banklogs_itemname' => 'tax'));
         $user_new = array();
         if (is_member_of($vbulletin->userinfo, $vbulletin->kbank['BankRuptGroupID'])) {
             if ($ban_record = $vbulletin->db->query_first("\n\t\t\t\t\tSELECT * FROM `" . TABLE_PREFIX . "userban`\n\t\t\t\t\tWHERE userid = adminid\n\t\t\t\t\t\tAND userid = {$vbulletin->userinfo['userid']}\n\t\t\t\t\t\t#AND reason = 'kbank_bankrupt_tax'")) {
                 $user_new = array_merge($user_new, array('usergroupid' => $ban_record['usergroupid'], 'displaygroupid' => $ban_record['displaygroupid'], 'usertitle' => $ban_record['usertitle'], 'customtitle' => $ban_record['customtitle']));
                 $vbulletin->db->query_write("\n\t\t\t\t\t\tDELETE FROM `" . TABLE_PREFIX . "userban`\n\t\t\t\t\t\tWHERE userid = {$vbulletin->userinfo['userid']}\n\t\t\t\t\t");
             } else {
                 $user_new['usergroupid'] = $vbulletin->kbank['NormalGroupID'];
                 $usergroup = $vbulletin->usergroupcache["{$user_new['usergroupid']}"];
                 if (!$usergroup['usertitle']) {
                     $gettitle = $db->query_first("\n\t\t\t\t\t\t\tSELECT title\n\t\t\t\t\t\t\tFROM " . TABLE_PREFIX . "usertitle\n\t\t\t\t\t\t\tWHERE minposts <= {$vbulletin->userinfo['posts']}\n\t\t\t\t\t\t\tORDER BY minposts DESC\n\t\t\t\t\t\t");
                     $user_new['usertitle'] = $gettitle['title'];
                 } else {
                     $user_new['usertitle'] = $usergroup['usertitle'];
                 }
             }
         }
         $user_new['kbank_nextpay'] = calcMonthlyTaxPayTime($vbulletin->userinfo, 'next');
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:kbank.php


示例13: foreach

 foreach ($vbulletin->forumcache as $forumid => $forum) {
     if (!$forum['link']) {
         $showinstant = 0;
         //get full forum info
         $forum = fetch_foruminfo($forum["forumid"], false);
         //if the user has permission to view the given forum, and if forum is postable...
         if ($perms = fetch_permissions($forum["forumid"]) and $perms & $vbulletin->bf_ugp_forumpermissions["canview"] and $forum["cancontainthreads"] and $forum["displayorder"] > 0 and $forum["options"] & $vbulletin->bf_misc_forumoptions['active']) {
             //get the level of the subscription for the given forum
             $sub_level = $db->query_first("\r\n\t\t\t\t\tSELECT emailupdate\r\n\t\t\t\t\tFROM " . TABLE_PREFIX . "subscribeforum\r\n\t\t\t\t\tWHERE forumid = '" . $forum["forumid"] . "' AND userid = " . $vbulletin->userinfo['userid'] . " LIMIT 1\r\n\t\t\t\t");
             $usergroupids = explode(",", $forum["ei_usergroups"]);
             //if the user hits the set all none or set all instant buttons...
             if ($_REQUEST["setall"] == "none") {
                 $sub_level["emailupdate"] = 0;
             }
             //write out a row with the info - title, description, and selected subscription
             if ($forum["ei_active"] and is_member_of($vbulletin->userinfo, $usergroupids)) {
                 $showinstant = 1;
                 $showallinstant = 1;
                 if ($_REQUEST["setall"] == "instant") {
                     $sub_level["emailupdate"] = 1;
                 }
             } else {
                 if ($_REQUEST["setall"] == "instant") {
                     $sub_level["emailupdate"] = 0;
                 }
             }
             eval('$forumbits .= "' . fetch_template('usercp_sub_mgr_forumbits') . '";');
         }
     }
 }
 // draw cp nav bar
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:subscribeforums.php


示例14: lower

        echo "morning.";
    } else {
        if ($hour < 18) {
            echo "afternoon.";
        } else {
            echo "evening.";
        }
    }
}
?>
 Since you're on the support side of things you now get to see a list of systems
and the numbers of requests active for each one.  Click on the name of a system to
see those currently active requests. Create a search called 'Home' to replace this default list.
<?php 
// Should already be tested, but we might as well check again.
if (!is_member_of('Admin', 'Support', 'Contractor')) {
    return;
}
$query = "SELECT s.system_id, lower(s.system_desc) AS lcname, s.system_desc, ";
$query .= "to_char( max(r.request_on), 'D Mon YYYY') AS last_request_date, ";
$query .= "count(r.request_id) AS active_sys_requests ";
$query .= "FROM work_system s ";
$query .= "JOIN system_usr su ON s.system_id = su.system_id ";
$query .= "JOIN request r ON r.system_id = su.system_id ";
$query .= "WHERE su.user_no = {$session->user_no} AND s.active AND r.active ";
$query .= "AND su.role IN ( 'A', 'S', 'C', 'E', 'O', 'V' ) ";
$query .= "AND (r.last_activity > (current_timestamp - '30 days'::interval) ";
$query .= "     OR r.last_status NOT IN ( 'F', 'C' ) ) ";
$query .= "GROUP BY lower(s.system_desc), s.system_id, s.system_desc ";
$query .= "HAVING COUNT(r.request_id) > 0 ";
$query .= "ORDER BY lower(s.system_desc) ";
开发者ID:Br3nda,项目名称:wrms,代码行数:31,代码来源:indexextsupport.php


示例15: intval

<?php

$because = "";
if (!$logged_on) {
    $because .= "You must log on with a valid password and maintainer ID\n";
}
$fsystem_id = intval("{$fsystem_id}");
if ($fsystem_id == 0) {
    if ($session->system_id == 0) {
        $because .= "You must select a valid system\n";
    } else {
        $fsystem_id == $session->system_id;
    }
}
// Validate that they are only maintaining a request for a system_id they
if (is_member_of('Admin')) {
    // OK, they can do anything :-)
} else {
    if ($system_id_roles["{$fsystem_id}"] == "V") {
        $because = "You may only view records for that system";
    } else {
        if ($system_id_roles["{$fsystem_id}"] == "H" || $system_id_roles["{$fsystem_id}"] == "M") {
            // That's OK - this is their home system_id, or maintenance is enabled
        } else {
            $because .= "You may only maintain requests from your organisation\n";
        }
    }
}
if ("{$because}" != "") {
    $because = "<H2>Errors with request:</H2>\n" . nl2br($because) . "<HR>\n";
    $because .= "<P><B>Changes have not been processed - please correct because and re-submit</B></P>\n";
开发者ID:Br3nda,项目名称:wrms,代码行数:31,代码来源:orglist-valid.php


示例16: explode

 $datetime[lastemail] = $now - 60 * 60 * 24 * $vbulletin->options['frequency'];
 $usergroups = explode(",", $vbulletin->options['usergroups']);
 if ($vbulletin->options['reminder_posts']) {
     $result = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastpost < '{$datetime['lastpost']}' AND emailDate < '{$datetime['lastemail']}' AND options & 16");
     //print("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16<br/>");
     $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET emailDate = '{$now}' WHERE lastpost < '{$datetime['lastpost']}' AND emailDate < '{$datetime['lastemail']}' AND options & 16");
     //print("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16<br/>");
 } else {
     $result = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastactivity < '{$datetime['lastpost']}' AND emailDate < '{$datetime['lastemail']}' AND options & 16");
     //print("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16<br/>");
     $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET emailDate = '{$now}' WHERE lastactivity < '{$datetime['lastpost']}' AND emailDate < '{$datetime['lastemail']}' AND options & 16");
     //print("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16<br/>");
 }
 print "Found " . mysql_num_rows($result) . " Inactive Users.<br/><br/>";
 while ($row = $vbulletin->db->fetch_array($result)) {
     if (is_member_of($row, $usergroups)) {
         print "Sent To: {$row['username']}<br/>";
         $username = $row[username];
         $toemail = $row[email];
         $userid = $row[userid];
         $bbtitle = $vbulletin->options['bbtitle'];
         $homeurl = $vbulletin->options['homeurl'];
         $forumurl = $vbulletin->options['bburl'];
         $hometitle = $vbulletin->options['hometitle'];
         eval('$message = "' . addslashes($vbulletin->options['message']) . '";');
         $message = stripslashes($message);
         //$headers  = "MIME-Version: 1.0" . "\r\nContent-type: text/html; charset=iso-8859-1" . "\r\n";
         $uheaders .= "To: {$username} <{$email}>" . "\r\n";
         $uheaders .= "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n";
         eval('$subject = "' . addslashes($vbulletin->options['subject']) . '";');
         $subject = stripslashes($subject);
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:remindermail.php


示例17: is_member_of

<?php

include "always.php";
require_once "authorisation-page.php";
$session->LoginRequired();
$can_edit = is_member_of('Admin', 'Support');
$can_vote = is_member_of('Admin', 'Support');
$can_cool = is_member_of('Admin', 'Support');
$can_can = is_member_of('Admin');
$form = "wu";
$nodename = str_replace("\\", "", $wu);
$nodename = str_replace("/", "", $nodename);
$nodename = str_replace("'", "''", $nodename);
$last = intval("{$last}");
if (isset($node_id)) {
    $node_id = intval($node_id);
    $current_node = $node_id;
}
if ("{$submit}" != "") {
    include "{$form}-valid.php";
    if ("{$because}" == "") {
        include "{$form}-action.php";
    }
}
$title = "{$system_name} - " . ucfirst($form);
$right_panel = true;
include "page-header.php";
include "{$form}-form.php";
include "page-footer.php";
开发者ID:Br3nda,项目名称:wrms,代码行数:29,代码来源:wu.php


示例18: printf

            }
            echo "</tr>\n";
        }
        if ("{$uncharged}" != "") {
            echo "<tr><td colspan={$numcols}><input type=submit class=submit alt=\"apply changes\" name=submit value=\"Apply Charges\"></td></tr>\n";
            echo "</form>\n";
        }
        printf("<tr class=row%1d>\n", $i % 2);
        printf("<td align=right colspan=" . (isset($org_code) && $org_code > 0 ? "3" : "4") . ">%9.2f hours</td>\n", $total_hours);
        printf("<th colspan=2 align=right>%9.2f</td>\n", $grand_total);
        echo "<td colspan=2>&nbsp;</td></tr>\n";
        echo "</table>\n";
    }
}
echo "</table></form>\n";
if (is_member_of('Admin', 'Support') && "{$style}" != "stripped") {
    $this_page = "{$PHP_SELF}?f={$form}&style=%s&format=%s";
    if ("{$search_for}" != "") {
        $this_page .= "&search_for={$search_for}";
    }
    if (isset($org_code) && $org_code > 0) {
        $this_page .= "&org_code={$org_code}";
    }
    if (isset($system_id) && $system_id > 0) {
        $this_page .= "&system_id={$system_id}";
    }
    if (isset($requested_by)) {
        $this_page .= "&requested_by={$requested_by}";
    }
    if (isset($user_no) && $user_no > 0) {
        $this_page .= "&user_no={$user_no}";
开发者ID:Br3nda,项目名称:wrms,代码行数:31,代码来源:timelist-form.php


示例19: iskBankCompany

function iskBankCompany($userinfo)
{
    //Require usergroupid (primary), membergroupids (additional)
    global $vbulletin;
    return is_member_of($userinfo, $vbulletin->kbank['CompanyGroupIDs']) and !is_member_of($userinfo, $vbulletin->kbank['BankRuptGroupID']);
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:6,代码来源:functions.php


示例20: array

<?php

$invalid = false;
// Validate that they are only maintaining their own timesheets
if (is_member_of('Admin', 'Support')) {
    // OK, they can add time onto requests :-)
} else {
    if (is_member_of('Contractor')) {
        // Build an array of the request IDs the person is trying to put time against
        $request_ids = array();
        for ($dow = 0; $dow < 7; $dow++) {
            while (list($k, $v) = each($tm[$dow])) {
                if ($v != "") {
                    list($number, $description) = split('/', $v, 2);
                    $number = intval($number);
                    if ($number > 0) {
                        $request_ids[$number] = $number;
                    }
                }
            }
        }
        // Select the user's system_role for each such system
        $sql = "SELECT request.request_id, system_usr.role ";
        $sql .= "FROM request LEFT OUTER JOIN system_usr ON request.system_id = system_usr.system_id AND system_usr.user_no=? ";
        $sql .= "WHERE request_id IN (" . implode(",", $request_ids) . ");";
        $qry = new PgQuery($sql, $session->user_no);
        if ($qry->Exec("TimeSheet")) {
            if ($qry->rows > 0) {
                while ($row = $qry->Fetch()) {
                    $request_ids[$row->request_id] = $row->role;
                }
开发者ID:Br3nda,项目名称:wrms,代码行数:31,代码来源:timesheet-valid.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP is_memcache_available函数代码示例发布时间:2022-05-15
下一篇:
PHP is_member函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap