本文整理汇总了PHP中People::GetUserRights方法的典型用法代码示例。如果您正苦于以下问题:PHP People::GetUserRights方法的具体用法?PHP People::GetUserRights怎么用?PHP People::GetUserRights使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类People
的用法示例。
在下文中一共展示了People::GetUserRights方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: People
$audit->GetLastAudit();
$tmpUser = new People();
$tmpUser->UserID = $audit->UserID;
$tmpUser->GetUserRights();
$audit->UserID = $tmpUser->FirstName == "" && $tmpUser->LastName == "" ? $audit->UserID : $tmpUser->FirstName . " " . $tmpUser->LastName;
// Give it back to the user to update the page
header('Content-Type: application/json');
echo json_encode($audit);
exit;
}
$audit->AuditStamp = __("Never");
$audit->GetLastAudit();
if ($audit->UserID != "") {
$tmpUser = new People();
$tmpUser->UserID = $audit->UserID;
$tmpUser->GetUserRights();
$AuditorName = $tmpUser->FirstName . " " . $tmpUser->LastName;
}
$pdu->CabinetID = $cab->CabinetID;
$PDUList = $pdu->GetPDUbyCabinet();
$dev->Cabinet = $cab->CabinetID;
$devList = $dev->ViewDevicesByCabinet();
$search = new Device();
$search->Cabinet = $cab->CabinetID;
$search->DeviceType = "Sensor";
$SensorList = $search->Search();
$stats = $cab->getStats($cab->CabinetID);
$totalWatts = $stats->Wattage;
$totalWeight = $stats->Weight;
$totalMoment = 0;
if ($config->ParameterArray["ReservedColor"] != "#FFFFFF" || $config->ParameterArray["FreeSpaceColor"] != "#FFFFFF") {
示例2: Current
static function Current()
{
$cperson = new People();
if (php_sapi_name() == "cli") {
// If the script is being called from the command line, just give God priveleges and be done with it
$cperson->UserID = "cli_admin";
$cperson->ReadAccess = true;
$cperson->WriteAccess = true;
$cperson->SiteAdmin = true;
$cperson->Disabled = false;
} elseif (AUTHENTICATION == "Apache") {
if (!isset($_SERVER["REMOTE_USER"])) {
return false;
}
$cperson->UserID = $_SERVER['REMOTE_USER'];
$cperson->GetUserRights();
} elseif (AUTHENTICATION == "Oauth") {
if (!isset($_SESSION['userid'])) {
return false;
}
$cperson->UserID = $_SESSION['userid'];
$cperson->GetUserRights();
}
return $cperson;
}
示例3: getAuditorName
/**
* Return the auditor's name.
*
* @param Cabinet $cab
* @param string|null $emptyVal
* @return string|null
*/
function getAuditorName($cab, $emptyVal = null)
{
$auditorName = $emptyVal;
$cab_audit = new CabinetAudit();
$cab_audit->CabinetID = $cab->CabinetID;
$cab_audit->GetLastAudit();
if ($cab_audit->UserID) {
$tmpUser = new People();
$tmpUser->UserID = $cab_audit->UserID;
$tmpUser->GetUserRights();
$auditorName = $tmpUser->LastName . ", " . $tmpUser->FirstName;
}
return $auditorName;
}
示例4: isset
$userRights->SiteAdmin = isset($_POST['SiteAdmin']) ? 1 : 0;
$userRights->Disabled = isset($_POST['Disabled']) ? 1 : 0;
if ($_POST['action'] == 'Create') {
$userRights->CreatePerson();
// We've, hopefully, successfully created a new device. Force them to the new device page.
header('Location: ' . redirect("usermgr.php?PersonID={$userRights->PersonID}"));
exit;
} else {
$status = __("Updated");
$userRights->UpdatePerson();
}
} else {
//Should we ever add a delete user function it will go here
}
// Reload rights because actions like disable reset other rights
$userRights->GetUserRights();
}
$userList = $userRights->GetUserList();
$adminown = $userRights->AdminOwnDevices ? "checked" : "";
$read = $userRights->ReadAccess ? "checked" : "";
$write = $userRights->WriteAccess ? "checked" : "";
$delete = $userRights->DeleteAccess ? "checked" : "";
$contact = $userRights->ContactAdmin ? "checked" : "";
$request = $userRights->RackRequest ? "checked" : "";
$RackAdmin = $userRights->RackAdmin ? "checked" : "";
$admin = $userRights->SiteAdmin ? "checked" : "";
$Disabled = $userRights->Disabled ? "checked" : "";
?>
<!doctype html>
<html>
<head>
示例5: Device
$device = new Device();
$cab = new Cabinet();
$dc = new DataCenter();
$pdu = new PowerDistribution();
$panel = new PowerPanel();
$mfg = new Manufacturer();
$templ = new DeviceTemplate();
$pport = new PowerPorts();
$audit = new CabinetAudit();
$audit->CabinetID = $_REQUEST['cabinetid'];
$audit->AuditStamp = "Never";
$audit->GetLastAudit();
if ($audit->UserID != "") {
$tmpPerson = new People();
$tmpPerson->UserID = $audit->UserID;
$tmpPerson->GetUserRights();
$AuditorName = $tmpPerson->LastName . ", " . $tmpPerson->FirstName;
} else {
//If no audit has been completed $AuditorName will return an error
$AuditorName = "";
}
$_SESSION['AuditorName'] = $AuditorName;
$_SESSION['AuditStamp'] = $audit->AuditStamp;
class PDF extends FPDF
{
var $outlines = array();
var $OutlineRoot;
var $pdfconfig;
function PDF()
{
parent::FPDF('L');