本文整理汇总了PHP中getAllGroups函数的典型用法代码示例。如果您正苦于以下问题:PHP getAllGroups函数的具体用法?PHP getAllGroups怎么用?PHP getAllGroups使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getAllGroups函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getGroupAndTagInfos
public function getGroupAndTagInfos()
{
global $user;
$a = array();
if (user_access("view alldata", "churchdb")) {
$a["groups"] = getAllGroups();
} else {
$a["groups"] = churchdb_getMyGroups($user->id, false, true);
}
$a["tags"] = getAllTags();
return $a;
}
开发者ID:lhaselauer,项目名称:churchtools_basic,代码行数:12,代码来源:CTChurchServiceModule.class.php
示例2: getMasterData
/**
* get master data
* @see CTModuleInterface::getMasterData()
*
* @return array
*/
public function getMasterData()
{
global $user, $base_url, $files_dir, $config;
$res = churchdb_getMasterDataTables();
$res["feldtyp"] = churchcore_getTableData("cdb_feldtyp");
$res["fields"] = getAllFields();
$res["groups"] = getAllGroups();
$res["tags"] = getAllTags();
$res["FUNachfolgeDomains"] = array("0" => array("id" => "0", "bezeichnung" => "Kein"), "1" => array("id" => "1", "bezeichnung" => $res["fields"]["f_group"]["fields"]["gruppentyp_id"]["text"]), "2" => array("id" => "2", "bezeichnung" => $res["fields"]["f_group"]["fields"]["distrikt_id"]["text"]), "3" => array("id" => "3", "bezeichnung" => t("group")));
$res["groupMemberTypes"] = getGroupMemberTypes();
$res["groupFilterTypes"] = churchdb_getGroupFilterTypes();
// master data information for maintain masterdata and statistics
if (user_access("edit masterdata", "churchdb") || user_access("view statistics", "churchdb")) {
$res["masterDataTables"] = churchdb_getMasterDataTablenames();
}
$res["user_pid"] = $user->id;
$res["userid"] = $user->vorname . " " . $user->cmsuserid . " [" . $user->id . "]";
$res["auth"] = churchdb_getAuthForAjax();
$res["site_name"] = getConf('site_name');
$res["modulespath"] = churchdb_getModulesPath();
$res["files_url"] = $base_url . $files_dir;
$res["modulename"] = "churchdb";
$res["max_uploadfile_size_kb"] = getConf('max_uploadfile_size_kb');
$res["adminemail"] = getConf('site_mail', '');
$res["max_exporter"] = getConf('churchdb_maxexporter', '150');
$res["groupnotchoosable"] = getConf('churchdb_groupnotchoosable', 30);
$res["home_lat"] = getConf('churchdb_home_lat', '53.568537');
$res["home_lng"] = getConf('churchdb_home_lng', '10.03656');
$res["settings"] = churchdb_getUserSettings($user->id);
$res["last_log_id"] = churchdb_getLastLogId();
$res["mailchimp"] = getConf('churchdb_mailchimp_apikey') != "";
$res["views"] = array("ArchiveView" => array("filename" => "cdb_archiveview"), "MapView" => array("filename" => "cdb_mapview"), "StatisticView" => array("filename" => "cdb_statisticview"), "SettingsView" => array("filename" => "cdb_settingsview"), "MaintainView" => array("filename" => "cdb_maintainview"), "WeekView" => array("filename" => "../churchresource/cr_weekview"));
if (user_access("administer persons", "churchcore")) {
$res["auth_table"] = churchdb_getAuthTable();
}
if (isset($res["auth"]["edit newsletter"])) {
$nl = churchdb_getTableData("cdb_newsletter");
$newsletter = array();
foreach ($res["auth"]["edit newsletter"] as $n) {
$newsletter = $nl[$n];
}
$res["newsletter"] = $newsletter;
}
return $res;
}
开发者ID:toXel,项目名称:churchtools_basic,代码行数:51,代码来源:CTChurchDBModule.class.php
示例3: checkAdmin
<?php
/**
* Script to edit / add / delete groups
*************************************************/
/* verify that user is admin */
checkAdmin();
/**
* First print table of existing groups with edit / delete links!
*/
$groups = getAllGroups();
/* get all settings */
$settings = getallSettings();
?>
<!-- display existing groups -->
<h4><?php
print _('Group management');
?>
</h4>
<hr><br>
<!-- Add new -->
<button class='btn btn-sm btn-default editGroup' style="margin-bottom:10px;" data-action='add'><i class='fa fa-plus'></i> <?php
print _('Create group');
?>
</button>
<!-- table -->
<table id="userPrint" class="table table-striped table-top table-auto">
开发者ID:kinhvan017,项目名称:phpipam,代码行数:31,代码来源:groups.php
示例4: array
if (isset($_GET['type'])) {
$is_gp = $_GET['type'];
} else {
$is_gp = 0;
}
$params = array('min' => $start, 'max' => $start + $maxperpage, 'filter' => $_GET["filter"]);
if (isset($_GET['favourite'])) {
$params['canShow'] = true;
$params['localSidebar'] = true;
}
if ($is_gp == 1) {
# Profile
$list = getAllProfiles($params);
$count = countAllProfiles($params);
} else {
$list = getAllGroups($params);
$count = countAllGroups($params);
}
$filter = $_GET["filter"];
$ids = array();
$name = array();
$type = array();
$show = array();
$action_delete = array();
if ($is_gp != 1) {
// Simple Group
$delete = new ActionPopupItem(_T("Delete this group", 'dyngroup'), "delete_group", "delete", "id", "base", "computers");
} else {
// Imaging group
$delete = new ActionPopupItem(_T("Delete this imaging group", 'dyngroup'), "delete_group", "delete", "id", "imaging", "manage");
}
开发者ID:pulse-project,项目名称:pulse,代码行数:31,代码来源:ajaxListGroups.php
示例5: array
*
* You should have received a copy of the GNU General Public License
* along with MMC. If not, see <http://www.gnu.org/licenses/>.
*/
$paramArray = array('id' => isset($_GET['id']) ? $_GET['id'] : $_GET['gid'], 'gid' => isset($_GET['gid']) ? $_GET['gid'] : "", 'groupname' => isset($_GET['groupname']) ? $_GET['groupname'] : "", 'type' => isset($_GET['type']) ? $_GET['type'] : "");
$actions = array();
if (isset($_GET['type'])) {
$is_gp = $_GET['type'] == 'group' ? 1 : $_GET['type'];
} else {
$is_gp = 0;
}
if ($is_gp && $is_gp == 1) {
# Profile
$list = getAllProfiles(array());
} else {
$list = getAllGroups(array());
}
if ($is_gp != 1) {
$delete = new ActionPopupItem(_T("Delete this group", 'dyngroup'), "delete_group", "delete", "id", "base", "computers");
} else {
$delete = new ActionPopupItem(_T("Delete this profile", 'dyngroup'), "delete_group", "delete", "id", "base", "computers");
}
if ($is_gp != 1) {
// Simple group
$actions['displayGroup'] = new ActionItem(_T("Display this group's content", 'dyngroup'), "display", "display", "id", "base", "computers");
if (in_array("inventory", $_SESSION["supportModList"])) {
$actions['inventory'] = new ActionItem(_T("Inventory on this group", "dyngroup"), "groupinvtabs", "inventory", "inventory", "base", "computers");
} else {
# TODO implement the glpi inventory on groups
# $n->addActionItem(new ActionItem(_T("Inventory on this group", "dyngroup"),"groupglpitabs","inventory","inventory", "base", "computers"));
}
开发者ID:psyray,项目名称:mmc,代码行数:31,代码来源:menu_group_action.php
示例6: queryByAction
function queryByAction($obj)
{
global $wpdb;
$table_name = $wpdb->prefix . "vlib_templates";
$action = htmlspecialchars(trim($obj['action']));
switch ($action) {
/* ************************** */
/* PLOTS */
case 'save':
$name = $obj['name'];
$descr = $obj['description'];
$graph = $obj['sceneGraph'];
$placeholders = $obj['placeholders'];
$thumbnail = $obj['thumbnail'];
$tId = createTemplateQuery($name, $descr, $graph, $thumbnail);
foreach ($placeholders as $pattern) {
$pId = createPlaceholderQuery($pattern);
createTemplateHasPlaceholderQuery($tId, $pId);
}
echo $tId;
break;
case 'update_t':
$tId = $obj['id'];
$name = $obj['name'];
$descr = $obj['description'];
$graph = $obj['sceneGraph'];
$placeholders = $obj['placeholders'];
$thumbnail = $obj['thumbnail'];
/* delete patterns */
$patterns = getPlaceholdersByPlotIdQuery($tId);
if ($patterns) {
foreach ($patterns as $pattern) {
deletePlaceholderByIdQuery($pattern->id);
}
/* delete plot-pattern mappings */
deleteTemplateHasPlaceholderQuery($tId);
}
foreach ($placeholders as $pattern) {
$pId = createPlaceholderQuery($pattern);
createTemplateHasPlaceholderQuery($tId, $pId);
}
updateTemplateQuery($tId, $name, $descr, $graph, $thumbnail);
print "Template <b>{$name}</b> has been updated.";
break;
case 'delete_t':
$name = $obj['name'];
$tId = $obj["id"];
/* delete patterns */
$patterns = getPlaceholdersByPlotIdQuery($tId);
if ($patterns) {
foreach ($patterns as $pattern) {
deletePlaceholderByIdQuery($pattern->id);
}
/* delete plot-pattern mappings */
deleteTemplateHasPlaceholderQuery($tId);
}
/* delete plot*/
$results = deleteTemplateByIdQuery($tId);
if ($results === 1) {
print $results;
} else {
print "There has been an error deleting the template!";
}
break;
case 'get_t':
$results = getTemplatesQuery();
if (count($results) > 0) {
print json_encode($results);
}
break;
case 'get_t_id':
$id = $obj['id'];
$results = getTemplateByIdQuery($id);
if (count($results) > 0) {
print json_encode($results);
}
break;
/* ************************** */
/* GROUPS */
/* ************************** */
/* GROUPS */
case 'save-group':
$name = $obj['group']['config']['name'];
$descr = $obj['group']['config']['description'];
$group = $obj['group'];
print createGroupQuery($name, $descr, $group);
break;
case 'load-group':
$id = $obj['id'];
$result = getGroupByIdQuery($id);
$response = array(id => $result[0]->id, name => $result[0]->name, description => $result[0]->description, group => json_decode($result[0]->group_json));
print json_encode($response);
break;
case 'load-all-groups':
$result = getAllGroups();
print json_encode($result);
break;
case 'load-all-group-definitions':
$result = getAllGroupDefinitions();
print json_encode($result);
//.........这里部分代码省略.........
开发者ID:ndyGit,项目名称:vPlot,代码行数:101,代码来源:Query.php
示例7: getAllGroups
<!-- Google Fonts -->
<link href='https://fonts.googleapis.com/css?family=Marcellus' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Josefin+Sans&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
</head>
<body>
<?php
require_once '../includes/session-start.req-inc.php';
require_once '../includes/access-required.html.php';
include_once '../functions/dbconnect.php';
include_once '../functions/util.php';
include_once '../functions/user_functions.php';
include_once '../functions/address_functions.php';
include_once '../functions/image_upload.php';
$address_groups = getAllGroups();
$user_id = $_SESSION['user_id'];
$address_group_id = '';
$fullname = '';
$email = '';
$address = '';
$phone = '';
$website = '';
$birthday = '';
if (isPostRequest()) {
$address_group_id = filter_input(INPUT_POST, 'address_group_id');
$fullname = filter_input(INPUT_POST, 'fullname');
$email = filter_input(INPUT_POST, 'email');
$address = filter_input(INPUT_POST, 'address');
$phone = filter_input(INPUT_POST, 'phone');
$website = filter_input(INPUT_POST, 'website');
开发者ID:emacc,项目名称:PHPClassSummer2015,代码行数:30,代码来源:add_address.php
示例8: header
<?php
header('Content-Type: application/json');
require_once 'index.php';
require_once 'classes/group.php';
$value = array("error" => "Missing argument");
if (isset($_GET["action"])) {
switch ($_GET["action"]) {
case "getGroup":
if (isset($_GET["id"])) {
//Get player by id
$value = getGroup($_GET["id"]);
if ($value == false) {
$value = array("error" => "No group");
}
} else {
$value = array("error" => "Missing argument");
}
break;
case "getAllGroups":
$value = getAllGroups(null);
if ($value == false) {
$value = array("error" => "No groups");
}
break;
}
}
exit(json_encode($value));
开发者ID:Quartzcraft,项目名称:Website,代码行数:28,代码来源:group.php
示例9: writeChangelog
//.........这里部分代码省略.........
if ($v == 0) {
$v = "None";
} elseif ($v != "NULL") {
$dev = getVLANById($v);
$v = $dev['name'] . " [{$dev['number']}]";
}
} elseif ($k == 'vrfId') {
//get old and new device
if ($old[$k] == 0) {
$old[$k] = "None";
} elseif ($old[$k] != "NULL") {
$dev = getVRFDetailsById($old[$k]);
$old[$k] = $dev['name'] . " [{$dev['description']}]";
}
if ($v == 0) {
$v = "None";
} elseif ($v != "NULL") {
$dev = getVRFDetailsById($v);
$v = $dev['name'] . " [{$dev['description']}]";
}
} elseif ($k == 'masterSection') {
if ($old[$k] == 0) {
$old[$k] = "Root";
} else {
$dev = getSectionDetailsById($old[$k]);
$old[$k] = "{$dev['name']}";
}
if ($v == 0) {
$v = "Root";
} else {
$dev = getSectionDetailsById($v);
$v = "{$dev['name']}";
}
} elseif ($k == "permissions") {
# get old and compare
$new['permissions'] = str_replace("\\", "", $new['permissions']);
//Remove /
# Get all groups:
$groups = getAllGroups();
$groups = rekeyGroups($groups);
# reformat:
$newp = json_decode($new['permissions']);
$v = '';
foreach ($newp as $ke => $p) {
$v .= "<br>" . $groups[$ke]['g_name'] . " : " . parsePermissions($p);
}
$old[$k] = "";
}
$log["[{$k}]"] = "{$old[$k]} => {$v}";
}
}
} elseif ($action == "add") {
$log['[create]'] = "{$ctype} created";
} elseif ($action == "delete") {
$log['[delete]'] = "{$ctype} deleted";
$new['id'] = $old['id'];
} elseif ($action == "truncate") {
$log['[truncate]'] = "Subnet truncated";
} elseif ($action == "resize") {
$log['[resize]'] = "Subnet Resized";
$log['[New mask]'] = "/" . $new['mask'];
} elseif ($action == "perm_change") {
# get old and compare
$new['permissions_change'] = str_replace("\\", "", $new['permissions_change']);
//Remove /
# Get all groups:
$groups = getAllGroups();
$groups = rekeyGroups($groups);
# reformat
if ($new['permissions_change'] != "null") {
$newp = json_decode($new['permissions_change']);
foreach ($newp as $k => $p) {
$log['[Permissions]'] .= "<br>" . $groups[$k]['g_name'] . " : " . parsePermissions($p);
}
}
}
//if change happened write it!
if (isset($log)) {
# format change
foreach (@$log as $k => $l) {
$changelog .= "{$k} {$l}\n";
}
$changelog = $database->real_escape_string(trim($changelog));
# set insert query
$query = "insert into `changelog` (`ctype`,`coid`,`cuser`,`caction`,`cresult`,`cdate`,`cdiff`) values ('{$ctype}', '{$new['id']}', '{$cuser['id']}', '{$action}', '{$result}', NOW(), '{$changelog}');";
# execute
try {
$database->executeQuery($query);
} catch (Exception $e) {
$error = $e->getMessage();
return true;
}
# mail it!
# all good
return true;
}
} else {
return true;
}
}
开发者ID:retexica,项目名称:phpipam,代码行数:101,代码来源:functions-network.php
示例10: SideMenuItem
* $Id$
*
* This file is part of Mandriva Management Console (MMC).
*
* MMC is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MMC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC. If not, see <http://www.gnu.org/licenses/>.
*/
/* Add new sidemenu item */
require_once "modules/dyngroup/includes/includes.php";
require_once "modules/pulse2/includes/profiles_xmlrpc.inc.php";
$sidemenu->addSideMenuItem(new SideMenuItem(_T("All groups", "dyngroup"), "base", "computers", "list", "img/machines/icn_allGroups_active.gif", "img/machines/icn_allGroups_ro.gif"));
$sidemenu->addSideMenuItem(new SideMenuItem(_T("Add a group", "dyngroup"), "base", "computers", "computersgroupcreator", "img/machines/icn_addGroup_active.gif", "img/machines/icn_addGroup_ro.gif"));
$items = array();
$groups = getAllGroups(array('canShow' => true, 'localSidebar' => true));
foreach ($groups as $group) {
$isA = $group->isDyn() ? !$group->isRequest() ? _T('Static group:', 'dyngroup') : _T('Dynamic group:', 'dyngroup') : _T('Static group:', 'dyngroup');
$s = new SideMenuItemNoAclCheck(sprintf("%s<br />%s", $isA, $group->getName()), "base", "computers", "display&gid=" . $group->id . "&groupname=" . $group->name);
$s->setCssId("displayid" . $group->id);
$items[$group->id] = $s;
$sidemenu->addSideMenuItem($items[$group->id]);
}
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:localSidebar.php
示例11: churchdb_getAllowedGroups
/**
* get group data from all groups i have permission for
* (all with right view alldetails, else my groups only
*
* @return array with group(object?)s
*/
function churchdb_getAllowedGroups()
{
global $user;
if (user_access("administer groups", "churchdb") || user_access("view alldetails", "churchdb")) {
return getAllGroups();
} else {
return churchdb_GetMyGroups($user->id);
}
}
开发者ID:lhaselauer,项目名称:churchtools_basic,代码行数:15,代码来源:churchdb_db.php
示例12: displayEmail
function displayEmail($template = "")
{
global $sourceFolder, $urlRequestRoot;
$newSelected = "";
if ($template == "" || $template == "new") {
$newSelected = " selected";
$content = "";
}
$emailTemplates = "<select id='emailtemplates' name='emailtemplates'><option value='new'{$newSelected}>Create New Template</option>";
$dir = "{$sourceFolder}/languages/" . LANGUAGE . "/email/templates/";
$handle = opendir($dir);
$subject = "";
$content = "";
while ($file = readdir($handle)) {
if (substr($file, -4, 4) == ".txt") {
$name = substr($file, 0, -4);
if ($name == $template) {
$emailTemplates .= "<option value='{$name}' selected> {$name} </option>";
$content = fread(fopen($dir . $file, 'r'), filesize($dir . $file));
$subject = $name;
} else {
$emailTemplates .= "<option value='{$name}'> {$name} </option>";
}
}
}
$emailTemplates .= "</select>";
global $ICONS;
$groups = getAllGroups();
$users = getAllUsers();
$ret = smarttable::render(array('rcpttable'), null);
$ret .= <<<RET
\t<script type='text/javascript'>
\tvar grouplist = { {$groups} };
\tvar userlist = { {$users} };
\tfunction fetchEmail() {
\t\twindow.location = './+admin&subaction=openemail&name=' + document.getElementById('emailtemplates').value;
\t}
\t
\tfunction saveEmail(e) {
\t\tvar name = prompt("enter name for template", document.getElementById('subject').value);
\t\tif(name != '') {
\t\t\te.form.action += 'save&name=';
\t\t\te.form.action += name;
\t\t\te.form.submit();
\t\t}
\t}
\t
\tfunction renderCheckList(arr,class) {
\t\tvar ret = '<table name="rcptlisttable" id="rcpttable" class="userlisttable display"><thead><tr><th>Select Recipients</th></thead><tbody>';
\t\tfor(var key in arr)
\t\t\tret += "<tr><td><INPUT type=checkbox class=" + class + " value='" + key + "'> " + arr[key] + "</td></tr>";
\t\tret += "</tbody></table>";
\t\treturn ret;
\t}
\t
\tfunction selectAll() {
\t\tdocument.getElementById('recipient').innerHTML = 'All';
\t\tdocument.getElementById('list').innerHTML = 'All users selected';
\t}
\t
\tfunction selectGroups() {
\t\tdocument.getElementById('recipient').innerHTML = 'Selected Groups';
\t\tdocument.getElementById('list').innerHTML = "Group List:<br>" + renderCheckList(grouplist,'grouplist');
\t\tinitSmartTable();
\t}
\t
\tfunction selectUsers() {
\t\tdocument.getElementById('recipient').innerHTML = 'Selected Users';
\t\tdocument.getElementById('list').innerHTML = "User List:<br>" + renderCheckList(userlist,'userlist');
\t\tinitSmartTable();
\t}
\t
\tfunction getList(class) {
\t\tvar listarr = new Array();
\t\tvar list = document.getElementsByClassName(class);
\t\tvar l = list.length;
\t\tfor(var i = 0; i<l; i++)
\t\t\tif(list[i].checked)
\t\t\t\tlistarr.push(list[i].value);
\t\treturn listarr;
\t}
\t
\tfunction renderRecipient(arr) {
\t\tvar ret = '';
\t\tfor(var ele in arr)
\t\t\tret += arr[ele] + ', '
\t\tvar l = ret.length;
\t\tif(l>0)
\t\t\tret = ret.substring(0,l-2);
\t\treturn ret;
\t}
\t
\tfunction sendMail(e) {
\t\tvar recipient = document.getElementById('recipient').innerHTML;
\t\tvar recipients = 'all';
\t\tif(recipient == 'Selected Groups')
\t\t\trecipients = 'groups:' + renderRecipient(getList('grouplist'));
\t\telse if(recipient == 'Selected Users')
\t\t\trecipients = 'users:' + renderRecipient(getList('userlist'));
\t\tdocument.getElementById('recipients').value = recipients;
//.........这里部分代码省略.........
开发者ID:ksb1712,项目名称:pragyan,代码行数:101,代码来源:email.lib.php
示例13: switch
Script para manejar cualquier request para obtener datos de la base de datos
*/
require_once 'functions.php';
if (isset($_POST['id']) and isset($_POST['getData'])) {
switch ($_POST['getData']) {
case 0:
echo json_encode(getUserGroups($_POST['id']));
break;
case 1:
echo json_encode(getTeacherUserGroups($_POST['id']));
break;
case 2:
echo json_encode(getTeachers());
break;
case 3:
echo json_encode(getAllGroups());
break;
case 4:
echo json_encode(getTasksFromClass($_POST['group']));
break;
case 5:
echo json_encode(getStudentsFromClass($_POST['group']));
break;
case 6:
echo json_encode(getAllGroupsReport());
break;
case 7:
echo json_encode(getTeacherUserGroupsReport($_POST['id']));
break;
case 8:
echo json_encode(getAllStudents());
开发者ID:hecerinc,项目名称:inclassassistant,代码行数:31,代码来源:getData.php
示例14: logger
// Empty logger
logger("#############");
logger("");
// Empty logger
if (!isset($function) || $function == '') {
logger("No function to call");
}
$rptuser = mysql_real_escape_string($rptuser);
if ($function == 'getUsers') {
logger("Getting Users");
getAllUsers();
sendResponse($finalResult['UserInfo'], 'user');
} else {
if ($function == 'getGroups') {
logger("Getting Groups");
getAllGroups();
sendResponse($finalResult['GroupInfo'], 'group');
} else {
if ($function == 'getActions') {
logger("Getting Actions");
getAllActions();
sendResponse($finalResult['ActionInfo'], 'action');
} else {
if ($function == 'getHosts') {
logger("Getting Hosts");
getAllHosts();
sendResponse($finalResult['HostInfo'], 'host');
} else {
if ($function == 'getVolumes') {
logger("Getting Volumes");
getAllVolumes();
开发者ID:arvindt,项目名称:rgen,代码行数:31,代码来源:db_funcs.php
示例15: foreach
if (count($results) > 0) {
foreach ($results as $result) {
echo '<tr class=""><td><a href="feed.php?gid=' . $result['idClass'] . '&tid=' . $result['id'] . '">' . $result['name'] . '</a></td></tr>';
}
} else {
echo '<tr class=""><td>No hay actividades recientes</td></tr>';
}
?>
</tbody>
</table>
<legend>Mis Grupos</legend>
<table class="table striped bordered hovered">
<tbody>
<?php
if ($_SESSION['type'] == 0) {
$results = getAllGroups();
} else {
if ($_SESSION['type'] == 1) {
$results = getTeacherUserGroups($_SESSION['id']);
} else {
$results = getUserGroups($_SESSION['id']);
}
}
if (count($results) > 0) {
foreach ($results as $result) {
echo '<tr class=""><td><a href="groupSelection.php?id=' . $result['id'] . '">' . $result['name'] . '</a></td></tr>';
}
} else {
echo '<tr class=""><td>El usuario no está involucrado en ningún grupo</td></tr>';
}
?>
开发者ID:hecerinc,项目名称:inclassassistant,代码行数:31,代码来源:home.php
注:本文中的getAllGroups函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论