本文整理汇总了PHP中group::load方法的典型用法代码示例。如果您正苦于以下问题:PHP group::load方法的具体用法?PHP group::load怎么用?PHP group::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类group
的用法示例。
在下文中一共展示了group::load方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: group
<?php
/*
* This file is part of Infoschool - a web based school intranet.
* Copyright (C) 2004 Maikel Linke
*/
include 'var.php';
$output->secure();
$group = new group();
if (isset($_POST['gid'])) {
$group->data['id'] = (int) $_POST['gid'];
}
if (!$group->load()) {
redirect('./');
}
if (!$group->is_head()) {
redirect('./');
}
if (isset($_POST['meetings'])) {
$meetings = (array) $_POST['meetings'];
if (isset($meetings[0]['new'])) {
$group->add_meeting($meetings[0]);
}
unset($meetings[0]);
$group->mod_meetings($meetings);
}
redirect('group.php?id=' . $group->data['id']);
示例3: group
<?php
/*
* This file is part of Infoschool - a web based school intranet.
* Copyright (C) 2004 Maikel Linke
*/
include 'var.php';
$output->secure();
$group = new group();
if (isset($_POST['id'])) {
$group->id = (int) $_POST['id'];
}
if (!$group->load() || !$group->is_head()) {
redirect('./');
}
$assured = false;
if (isset($_POST['assured'])) {
$assured = $_POST['assured'];
}
if ($assured) {
$group->delete();
redirect('group.php');
} else {
$v = $group->data;
$content = new tmpl('group_del.html', $v);
$output->out($content);
}
示例4: group
<?php
/*
* This file is part of Infoschool - a web based school intranet.
* Copyright (C) 2004 Maikel Linke
*/
include 'var.php';
$output->secure();
$group = new group();
if (isset($_GET['id'])) {
$group->data['id'] = (int) $_GET['id'];
}
$nogroup = !$group->load();
if ($nogroup) {
$output->title[] = 'own groups';
$output->headline[] = 'own groups';
$select = 'id, name from gruppe where leiter="' . $_SESSION['userid'] . '" order by name';
$db->select($select);
$v['group'] = $db->data;
$content = new tmpl('own_groups.html', $v);
} else {
if ($group->is_head()) {
if (isset($_POST['data'])) {
$group->save($_POST['data']);
$group->load();
}
$group->format();
$content = new tmpl('group_mod.html', $group->fdata);
} else {
$group->format();
$content = new tmpl('group.html', $group->fdata);
示例5: group
<?php
/*
* This file is part of Infoschool - a web based school intranet.
* Copyright (C) 2004 Maikel Linke
*/
include 'var.php';
$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'];