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


PHP People::GetUserList方法代码示例

本文整理汇总了PHP中People::GetUserList方法的典型用法代码示例。如果您正苦于以下问题:PHP People::GetUserList方法的具体用法?PHP People::GetUserList怎么用?PHP People::GetUserList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在People的用法示例。


在下文中一共展示了People::GetUserList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: header

    $esx->VMIndex = $_REQUEST['vmindex'];
    $esx->GetVMbyIndex();
    $dev->DeviceID = $esx->DeviceID;
    $dev->GetDevice();
    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'Update') {
        $esx->Owner = $_REQUEST['owner'];
        $esx->PrimaryContact = $_REQUEST['contact'];
        $esx->UpdateVMOwner();
        header('Location: ' . redirect("devices.php?DeviceID={$esx->DeviceID}"));
    }
} else {
    // How'd you get here without a valid vmindex?
    header('Location: ' . redirect());
    exit;
}
$contactList = $con->GetUserList();
$deptList = $dept->GetDepartmentList();
?>
<!doctype html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
  <meta http-equiv="EXPIRES" content="Mon, 01 Jan 1997 01:00:00 GMT">
  <meta http-equiv="PRAGMA" content="NO-CACHE">
  
  <title>openDCIM Device Maintenance</title>
  <link rel="stylesheet" href="css/inventory.php" type="text/css">
  <link rel="stylesheet" href="css/jquery-ui.css" type="text/css">
  <!--[if lt IE 9]>
开发者ID:paragm,项目名称:openDCIM,代码行数:31,代码来源:updatevmowner.php

示例2: header

        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>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
开发者ID:ghasedak,项目名称:openDCIM,代码行数:31,代码来源:usermgr.php

示例3: upgrade


//.........这里部分代码省略.........
        // Rebuild the config table just in case.
        $config->rebuild();
        $version = "3.1";
    }
    if ($version == "3.1") {
        // First apply the schema updates needed.
        $results[] = applyupdate("db-3.1-to-3.2.sql");
        // Rebuild the config table just in case.
        $config->rebuild();
        $version = "3.2";
    }
    if ($version == "3.2") {
        // First apply the schema updates needed.
        $results[] = applyupdate("db-3.2-to-3.3.sql");
        // Rebuild the config table just in case.
        $config->rebuild();
        $version = "3.3";
    }
    if ($version == "3.3") {
        // First apply the schema updates needed.
        $results[] = applyupdate("db-3.3-to-4.0.sql");
        // Rebuild the config table just in case.
        $config->rebuild();
        // We added in some new config items and one of them is referenced in misc.
        // Reload the config;
        $config->Config();
        // We have several things to convert this time around.
        // Bring up the rest of the classes
        require_once "facilities.inc.php";
        // People conversion
        $p = new People();
        $c = new Contact();
        $u = new User();
        $plist = $p->GetUserList();
        // Check if we have an empty fac_People table then merge if that's the case
        if (sizeof($plist) == 0) {
            $clist = $c->GetContactList();
            foreach ($clist as $tmpc) {
                foreach ($tmpc as $prop => $val) {
                    $p->{$prop} = $val;
                }
                // we're keeping the Contact ID so assign it to the PersonID
                $p->PersonID = $tmpc->ContactID;
                $u->UserID = $p->UserID;
                $u->GetUserRights();
                foreach ($u as $prop => $val) {
                    $p->{$prop} = $val;
                }
                // This shouldn't be necessary but...
                $p->MakeSafe();
                $sql = "INSERT INTO fac_People SET PersonID={$p->PersonID}, UserID=\"{$p->UserID}\", \n\t\t\t\t\tAdminOwnDevices={$p->AdminOwnDevices}, ReadAccess={$p->ReadAccess}, \n\t\t\t\t\tWriteAccess={$p->WriteAccess}, DeleteAccess={$p->DeleteAccess}, \n\t\t\t\t\tContactAdmin={$p->ContactAdmin}, RackRequest={$p->RackRequest}, \n\t\t\t\t\tRackAdmin={$p->RackAdmin}, SiteAdmin={$p->SiteAdmin}, Disabled={$p->Disabled}, \n\t\t\t\t\tLastName=\"{$p->LastName}\", FirstName=\"{$p->FirstName}\", \n\t\t\t\t\tPhone1=\"{$p->Phone1}\", Phone2=\"{$p->Phone2}\", Phone3=\"{$p->Phone3}\", \n\t\t\t\t\tEmail=\"{$p->Email}\";";
                $dbh->query($sql);
            }
            $ulist = $u->GetUserList();
            foreach ($ulist as $tmpu) {
                /* This time around we have to see if the User is already in the fac_People table */
                $p->UserID = $tmpu->UserID;
                if (!$p->GetPersonByUserID()) {
                    foreach ($tmpu as $prop => $val) {
                        $p->{$prop} = $val;
                    }
                    // Names have changed formats between the user table and the people table
                    $p->LastName = $tmpu->Name;
                    $p->CreatePerson();
                }
            }
开发者ID:Gusenichka,项目名称:openDCIM,代码行数:67,代码来源:install.php

示例4: array_obj_diff

// This page has no function without a valid dept id
if (!isset($_REQUEST['deptid'])) {
    echo "How'd you get here without a referral?";
    exit;
}
$dept = new Department();
$person = new People();
$dept->DeptID = isset($_POST['deptid']) ? $_POST['deptid'] : $_GET['deptid'];
$dept->GetDeptByID();
// Update if form was submitted and action is set
if (isset($_POST['action']) && $_POST['action'] == "Submit") {
    $grpMembers = $_POST['chosen'];
    $dept->AssignContacts($grpMembers);
}
$deptList = $person->GetPeopleByDepartment($dept->DeptID);
$contactList = $person->GetUserList();
$possibleList = array_obj_diff($contactList, $deptList);
function array_obj_diff($array1, $array2)
{
    foreach ($array1 as $key => $value) {
        $array1[$key] = serialize($value);
    }
    foreach ($array2 as $key => $value) {
        $array2[$key] = serialize($value);
    }
    $array_diff = array_diff($array1, $array2);
    foreach ($array_diff as $key => $value) {
        $array_diff[$key] = unserialize($value);
    }
    return $array_diff;
}
开发者ID:ghasedak,项目名称:openDCIM,代码行数:31,代码来源:dept_groups.php


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