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


PHP getmember函数代码示例

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


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

示例1: getmember

function getmember($parent, $k, $detail, &$member, $c)
{
    $c++;
    foreach ($parent[$k] as $value) {
        if (array_key_exists($value, $parent)) {
            if ($c > 5) {
                return;
            }
            //只递归5层
            getmember($parent, $value, $detail, $member, $c);
        } else {
            $member[] =& $detail[$value];
        }
    }
    if (array_key_exists($k, $detail)) {
        $member[] =& $detail[$k];
    }
}
开发者ID:Elances,项目名称:svnmaia,代码行数:18,代码来源:import_access.php

示例2: intval

/*
     gettheblog.php用于获得用户的具体信息
     Add by am@ihome.2012-10-08  16:58
	 modified by xuxing@ihome. 2012-12-5 22:46
*/
include_once '../data_oauth_check.php';
$userid = intval(oauth_check());
include_once '../../../common.php';
include_once S_ROOT . './uc_client/client.php';
//@include_once(S_ROOT.'./data/data_profield.php');
$blogid = intval(trim($_POST[blogid]));
/*$blogid=645;
	$userid = 18;
	$username = 'seen';
	*/
getmember();
//print_r($_SGLOBAL);exit();
$result = array();
//chdir(dirname(dirname(dirname(__FILE__))));
$query = $_SGLOBAL['db']->query("SELECT b.blogid,b.friend,bf.target_ids,b.subject,bf.message,b.username,b.uid,b.pic,b.noreply,b.viewnum,b.replynum,b.dateline FROM " . tname('blog') . " b \r\n\t\t\t\tleft join " . tname('blogfield') . " bf  on b.blogid=bf.blogid where b.blogid={$blogid} ");
$blog = $_SGLOBAL['db']->fetch_array($query);
/*
//将日志中的图片进行绝对路径化。 start
preg_match_all("#[<]img\s+src[=]\"(.*)\".*[>]#U",$blog['message'], $matche, PREG_SET_ORDER);
//print_r($matches);
//print_r($matches);

foreach($matche as $item){
	//print_r($item[1]);
	$TmpString = $item[1]; 
	$TmpFace = $item[0];
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:do_gettheblog.php

示例3: checkperm

function checkperm($permtype)
{
    global $_SGLOBAL, $space;
    if ($permtype == 'admin') {
        $permtype = 'manageconfig';
    }
    $var = 'checkperm_' . $permtype;
    if (!isset($_SGLOBAL[$var])) {
        if (empty($_SGLOBAL['supe_uid'])) {
            $_SGLOBAL[$var] = '';
        } else {
            if (empty($_SGLOBAL['member'])) {
                getmember();
            }
            $gid = getgroupid($_SGLOBAL['member']['experience'], $_SGLOBAL['member']['groupid']);
            if (!@(include_once S_ROOT . './data/data_usergroup_' . $gid . '.php')) {
                usergroup_cache();
                @(include_once S_ROOT . './data/data_usergroup_' . $gid . '.php');
            }
            if ($gid != $_SGLOBAL['member']['groupid']) {
                updatetable('space', array('groupid' => $gid), array('uid' => $_SGLOBAL['supe_uid']));
                //赠送道具
                if ($_SGLOBAL['usergroup'][$gid]['magicaward']) {
                    include_once S_ROOT . './source/inc_magicaward.php';
                }
            }
            $_SGLOBAL[$var] = empty($_SGLOBAL['usergroup'][$gid][$permtype]) ? '' : $_SGLOBAL['usergroup'][$gid][$permtype];
            if (substr($permtype, 0, 6) == 'manage' && empty($_SGLOBAL[$var])) {
                $_SGLOBAL[$var] = $_SGLOBAL['usergroup'][$gid]['manageconfig'];
                //权限覆盖
                if (empty($_SGLOBAL[$var])) {
                    $_SGLOBAL[$var] = ckfounder($_SGLOBAL['supe_uid']) ? 1 : 0;
                    //创始人
                }
            }
        }
    }
    return $_SGLOBAL[$var];
}
开发者ID:NaturalWill,项目名称:UCQA,代码行数:39,代码来源:function_common.php

示例4: e_addemail

 if ($_POST['list1']) {
     e_addemail($Email, $_POST['list1']);
 }
 if ($_POST['list1'] && $_POST['list2']) {
     e_addemail($Email, $_POST['list2']);
 }
 if ($_POST['list1'] && $_POST['list3']) {
     e_addemail($Email, $_POST['list3']);
 }
 if ($_POST['list1'] && $_POST['list4']) {
     e_addemail($Email, $_POST['list4']);
 }
 #################################################################
 #
 #insert into action history
 $memberid = getmember($Email);
 $actionid = $_POST['actionid'];
 $subject = $_POST['subject'];
 $text = $_POST['text'];
 $MM_editTable = "action_history";
 $MM_fieldsStr = "actionid|value|memberid|value|subjectText|value|Letter_Content|value|date|value";
 $MM_columnsStr = "actionid|',none,''|memberid|',none,''|subject|',none,''|text|',none,''|date|',none,now()";
 require "Connections/insetstuff.php";
 require "Connections/dataactions.php";
 ##### mail to target
 # get send info
 $actiondetails = $dbcon->Execute("select * from action_text where id = " . $dbcon->qstr($_POST['actionid']));
 if ($actiondetails) {
     # prepare email
     $finalemail = "Dear " . $actiondetails->Fields("prefix") . " " . $actiondetails->Fields("firstname") . " " . $actiondetails->Fields("lastname") . ",\n" . strip_tags($_REQUEST['Letter_Content'] . "\n" . $_REQUEST['Title'] . " " . $_REQUEST['First_Name'] . " " . $_REQUEST['Last_Name'] . " \n" . $_REQUEST['City'] . " " . $_REQUEST['State'] . ' ' . $_REQUEST['Country'] . " \n" . $_REQUEST['Email'] . " \n");
     #send emails
开发者ID:radicaldesigns,项目名称:amp,代码行数:31,代码来源:action.php

示例5: checkperm

function checkperm($permtype, $gid = 0)
{
    global $_SGLOBAL, $_SCONFIG, $channel, $channels;
    if (!@(include_once S_ROOT . './data/system/group.cache.php')) {
        include_once S_ROOT . './function/cache.func.php';
        updategroupcache();
    }
    $founderprem = array('managetpl', 'managecss', 'managestyletpl');
    if (ckfounder($_SGLOBAL['supe_uid'])) {
        return $permtype == 'allowdirectpost' ? false : true;
        //´´Ê¼È˲»×öȨÏÞ¼ì²é
    } elseif (in_array($permtype, $founderprem)) {
        return false;
        //·Ç´´Ê¼ÈËȨÏÞ
    }
    if (!$gid) {
        if (empty($_SGLOBAL['supe_uid'])) {
            getmember();
        }
        if (empty($_SGLOBAL['member']['groupid'])) {
            $gid = 2;
            //ÓοÍ×é
        } else {
            $gid = intval($_SGLOBAL['member']['groupid']);
            $gid = getgroupid($_SGLOBAL['member']['experience'], $gid);
            if ($gid != $_SGLOBAL['member']['groupid']) {
                updatetable('members', array('groupid' => $gid), array('uid' => $_SGLOBAL['supe_uid']));
                //¸üÐÂÓû§×é
            }
        }
        if (!empty($channel)) {
            if (!empty($channels['menus'][$channel][$permtype])) {
                $extgroupid = explode("\t", $channels['menus'][$channel][$permtype]);
                if (!in_array($gid, $extgroupid)) {
                    return false;
                }
                //ûÓÐƵµÀ·ÃÎÊȨ
            }
        }
    }
    if ($permtype == 'allowmanage') {
        return true;
    }
    return empty($_SGLOBAL['grouparr'][$gid][$permtype]) ? false : true;
}
开发者ID:hongz1125,项目名称:devil,代码行数:45,代码来源:common.func.php

示例6: array

	if($user = uc_get_user($uid, 1)) {
		$space = array('uid' => $user[0], 'username' => $user[1], 'dateline'=>$_SGLOBAL['timestamp'], 'friends'=>array());
		$_SN[$space['uid']] = $space['username'];
	}
}

//游客
if(empty($space)) {
	$space = array('uid'=>0, 'username'=>'guest', 'self'=>1);
	if($do == 'index') $do = 'feed';
}

//更新活动session
if($_SGLOBAL['supe_uid']) {
	
	getmember(); //获取当前用户信息
	
	if($_SGLOBAL['member']['flag'] == -1) {
		showmessage('space_has_been_locked');
	}
	
	//禁止访问
	if(checkperm('banvisit')) {
		ckspacelog();
		showmessage('you_do_not_have_permission_to_visit');
	}
	
	updatetable('session', array('lastactivity' => $_SGLOBAL['timestamp']), array('uid'=>$_SGLOBAL['supe_uid']));
}

//计划任务
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:space.php

示例7: checkperm

function checkperm($permtype)
{
    global $_SGLOBAL, $space;
    @(include_once S_ROOT . './data/data_usergroup.php');
    //升级身份
    if (empty($_SGLOBAL['supe_uid'])) {
        return '';
    } else {
        if (empty($_SGLOBAL['member'])) {
            //获取当前人
            getmember();
        }
        $gid = getgroupid($_SGLOBAL['member']['credit'], $_SGLOBAL['member']['groupid']);
        if ($gid != $_SGLOBAL['member']['groupid']) {
            //需要升级
            updatetable('space', array('groupid' => $gid), array('uid' => $_SGLOBAL['supe_uid']));
        }
    }
    if ($permtype == 'admin') {
        $permtype = 'manageconfig';
    }
    return empty($_SGLOBAL['usergroup'][$gid][$permtype]) ? '' : $_SGLOBAL['usergroup'][$gid][$permtype];
}
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:23,代码来源:function_common.php


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