當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。