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


PHP People::GetUserRights方法代码示例

本文整理汇总了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") {
开发者ID:olivierbeytrison,项目名称:openDCIM,代码行数:31,代码来源:cabnavigator.php

示例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;
 }
开发者ID:mnibbelink,项目名称:openDCIM,代码行数:25,代码来源:customers.inc.php

示例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;
}
开发者ID:dc-admin,项目名称:openDCIM,代码行数:21,代码来源:report_asset_Excel-new.php

示例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>
开发者ID:ghasedak,项目名称:openDCIM,代码行数:31,代码来源:usermgr.php

示例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');
开发者ID:ghasedak,项目名称:openDCIM,代码行数:31,代码来源:cabaudit.php


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