本文整理汇总了PHP中Cabinet::GetOccupants方法的典型用法代码示例。如果您正苦于以下问题:PHP Cabinet::GetOccupants方法的具体用法?PHP Cabinet::GetOccupants怎么用?PHP Cabinet::GetOccupants使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cabinet
的用法示例。
在下文中一共展示了Cabinet::GetOccupants方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$noTemplFlag = true;
}
if ($device->Owner == 0) {
$noOwnership = '(O)';
$noOwnerFlag = true;
}
if ($noTemplFlag or $noOwnerFlag) {
$retstr = '<span class="hlight">' . $noTemplate . $noOwnership . '</span>';
}
return array($noTemplFlag, $noOwnerFlag, $retstr);
}
$cab = new Cabinet();
$cab->CabinetID = $_REQUEST["cabinetid"];
$cab->GetCabinet();
// Check to see if this user is allowed to see anything in ihere
if (!$person->SiteAdmin && !$person->ReadAccess && $cab->Rights == 'None' && !array_intersect($person->isMemberOf(), Cabinet::GetOccupants($cab->CabinetID))) {
// This cabinet belongs to a department you don't have affiliation with, so no viewing at all
header('Location: ' . redirect());
exit;
}
// If you're deleting the cabinet, no need to pull in the rest of the information, so get it out of the way
// Only a site administrator can create or delete a cabinet
if (isset($_POST["delete"]) && $_POST["delete"] == "yes" && $person->SiteAdmin) {
$cab->DeleteCabinet();
header('Content-Type: application/json');
echo json_encode(array('url' => redirect("dc_stats.php?dc={$cab->DataCenterID}")));
exit;
}
$head = $legend = $zeroheight = $body = $deptcolor = $AuditorName = "";
$audit = new CabinetAudit();
$dev = new Device();