本文整理汇总了PHP中group::add_member方法的典型用法代码示例。如果您正苦于以下问题:PHP group::add_member方法的具体用法?PHP group::add_member怎么用?PHP group::add_member使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类group
的用法示例。
在下文中一共展示了group::add_member方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pg_new_edit
function pg_new_edit($pg)
{
$group = new group();
foreach ($pg as $gid => $persons) {
$group->load($gid);
if (!$group->is_head()) {
continue;
}
foreach ($persons as $pid => $decision) {
if ($decision == 0) {
continue;
}
$group->del_member_request($pid);
if ($decision == 1) {
continue;
}
$group->add_member($pid);
}
}
}
示例2: die
<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: addmember.inc.php,v 1.4 2007-03-10 09:03:17 touraine37 Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
die("no access");
}
$group = new group($groupID);
$res = $group->add_member($memberID);
if ($res) {
include './circ/groups/show_group.inc.php';
} else {
error_message($msg[919], $msg[923], 1, './circ.php?categ=groups');
}
?>
示例3: group
$output->secure();
$pid = $_SESSION['userid'];
$gid = (int) $_GET['gid'];
$group = new group();
if (!$group->load($gid)) {
redirect('./');
}
$action = '';
if (isset($_POST['action'])) {
$action = $_POST['action'];
}
if (isset($_GET['action'])) {
$action = $_GET['action'];
}
if ($action == 'join group') {
if ($group->is_head()) {
$group->add_member();
} else {
$group->member_request();
}
}
if ($action == 'leave group') {
if ($group->is_head() && isset($_GET['pid'])) {
$pid = $_GET['pid'];
}
$group->del_member($pid);
}
if ($action == 'remove request') {
$group->del_member_request($pid);
}
redirect('group.php?id=' . $gid);