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


PHP group::load方法代码示例

本文整理汇总了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);
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:infoschool-svn,代码行数:20,代码来源:pg_new.php

示例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']);
开发者ID:BackupTheBerlios,项目名称:infoschool-svn,代码行数:27,代码来源:meetings.php

示例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);
}
开发者ID:BackupTheBerlios,项目名称:infoschool-svn,代码行数:27,代码来源:group_del.php

示例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);
开发者ID:BackupTheBerlios,项目名称:infoschool-svn,代码行数:31,代码来源:group.php

示例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'];
开发者ID:BackupTheBerlios,项目名称:infoschool-svn,代码行数:31,代码来源:pg.php


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