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