本文整理匯總了PHP中Department::GetDeptByID方法的典型用法代碼示例。如果您正苦於以下問題:PHP Department::GetDeptByID方法的具體用法?PHP Department::GetDeptByID怎麽用?PHP Department::GetDeptByID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Department
的用法示例。
在下文中一共展示了Department::GetDeptByID方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: get_cabinet_owner_color
/**
* Determines ownership of the cabinet and returns the CSS class in case a
* color unequal white is assigned to the owner
*
* @param Cabinet $cabinet
* @param array &$deptswithcolor
* @return string CSS class or empty string
*/
function get_cabinet_owner_color($cabinet, &$deptswithcolor)
{
$cab_color = '';
if ($cabinet->AssignedTo != 0) {
$tempDept = new Department();
$tempDept->DeptID = $cabinet->AssignedTo;
$deptid = $tempDept->DeptID;
$tempDept->GetDeptByID();
if (strtoupper($tempDept->DeptColor) != "#FFFFFF") {
$deptswithcolor[$cabinet->AssignedTo]["color"] = $tempDept->DeptColor;
$deptswithcolor[$cabinet->AssignedTo]["name"] = $tempDept->Name;
$cab_color = "class=\"dept{$deptid}\"";
}
}
return $cab_color;
}
示例2: getColorofCabinetOwner
/**
* Determines ownership of the cabinet and returns the CSS class in case a
* color unequal white is assigned to the owner.
*
* @param Cabinet $cabinet
* @param array $deptswithcolor
* @return (string|array)[] CSS class or empty string
*/
function getColorofCabinetOwner($cabinet, $deptswithcolor)
{
$cab_color = '';
if ($cabinet->AssignedTo != 0) {
$tempDept = new Department();
$tempDept->DeptID = $cabinet->AssignedTo;
$deptid = $tempDept->DeptID;
if ($tempDept->GetDeptByID()) {
if (strtoupper($tempDept->DeptColor) != '#FFFFFF') {
$deptswithcolor[$cabinet->AssignedTo]['color'] = $tempDept->DeptColor;
$deptswithcolor[$cabinet->AssignedTo]['name'] = $tempDept->Name;
$cab_color = "class=\"dept{$deptid}\"";
}
}
}
return array($cab_color, $deptswithcolor);
}
示例3: printf
} else {
$outageStatus = __("Normal");
}
}
}
if (!$skipNormal || $skipNormal && ($outageStatus == __("Down") || $outageStatus == __("Undocumented"))) {
echo "<tr>\n";
printf("<td>%s</td>\n", $cabRow->Location);
printf("<td>%s</td>\n", $devRow->Label);
printf("<td>%s</td>\n", $outageStatus);
printf("<td>%s</td>\n", $devRow->Position);
$tmpPerson->PersonID = $devRow->PrimaryContact;
$tmpPerson->GetPerson();
printf("<td>%s</td>\n", $tmpPerson->Email);
$dept->DeptID = $devRow->Owner;
$dept->GetDeptByID();
printf("<td>%s</td>\n", $dept->Name);
echo "</tr>\n";
}
if ($devRow->ChassisSlots > 0 || $devRow->RearChassisSlots > 0) {
$kidList = $devRow->GetDeviceChildren();
foreach ($kidList as $k) {
$tmpPerson->PersonID = $devRow->PrimaryContact;
$tmpPerson->GetPerson();
echo "<tr>\n";
printf("<td>%s</td>\n", $cabRow->Location);
printf("<td>%s</td>\n", $k->Label);
printf("<td>%s</td>\n", $outageStatus);
printf("<td>%s</td>\n", __("Child"));
printf("<td>%s</td>\n", $tmpPerson->Email);
$dept->DeptID = $k->Owner;
示例4: buildESXtable
function buildESXtable($DeviceID)
{
$ESX = new ESX();
$ESX->DeviceID = $DeviceID;
$vmList = $ESX->GetDeviceInventory();
print "\n<div class=\"table border\"><div><div>" . __("VM Name") . "</div><div>" . __("Status") . "</div><div>" . __("Owner") . "</div><div>" . __("Last Updated") . "</div></div>\n";
foreach ($vmList as $vmRow) {
$onOff = preg_match('/off/i', $vmRow->vmState) ? 'off' : 'on';
$Dept = new Department();
$Dept->DeptID = $vmRow->Owner;
if ($Dept->DeptID > 0) {
$Dept->GetDeptByID();
} else {
$Dept->Name = __("Unknown");
}
print "<div><div>{$vmRow->vmName}</div><div class=\"{$onOff}\">{$vmRow->vmState}</div><div><a href=\"updatevmowner.php?vmindex={$vmRow->VMIndex}\">{$Dept->Name}</a></div><div>{$vmRow->LastUpdated}</div></div>\n";
}
echo '</div> <!-- END div.table -->';
}
示例5: UpdateDepartment
function UpdateDepartment()
{
$this->MakeSafe();
$olddept = new Department();
$olddept->DeptID = $this->DeptID;
$olddept->GetDeptByID();
$sql = "UPDATE fac_Department SET Name=\"{$this->Name}\", \n\t\t\tExecSponsor=\"{$this->ExecSponsor}\", SDM=\"{$this->SDM}\", \n\t\t\tClassification=\"{$this->Classification}\" , DeptColor=\"{$this->DeptColor}\" \n\t\t\tWHERE DeptID=\"{$this->DeptID}\";";
class_exists('LogActions') ? LogActions::LogThis($this, $olddept) : '';
$this->query($sql);
$this->MakeDisplay();
}
示例6: addRackStat
/**
* Collect rack information and add it to the cab_data inventory on all data
* centers
*
* @param array $invCab
* @param Cabinet $cab
* @param $cabinetColumns
* @param DataCenter $dc
* @param array $dcContainerList
*/
function addRackStat(&$invCab, $cab, $cabinetColumns, $dc, $dcContainerList)
{
$rack = makeEmptySpec($cabinetColumns, $dcContainerList);
if ($cab->AssignedTo != 0) {
$dept = new Department();
$dept->DeptID = $cab->AssignedTo;
$dept->GetDeptByID();
$deptName = $dept->Name;
} else {
$deptName = null;
}
$rack['CabID'] = $cab->CabinetID;
$rack['Zone'] = getZoneName($cab);
$rack['Row'] = getRowName($cab);
$rack['DC Name'] = $dc->Name;
$rack['Cabinet'] = $cab->Location;
$rack['AssignedTo'] = $deptName;
$rack['Tags'] = getTagsString($cab);
$rack['Height'] = $cab->CabinetHeight;
$rack['Model'] = $cab->Model;
$rack['Keylock'] = $cab->Keylock;
$rack['MaxKW'] = $cab->MaxKW;
$rack['MaxWeight'] = $cab->MaxWeight;
$rack['Install Date'] = $cab->InstallationDate;
$rack['Auditor'] = getAuditorName($cab);
$rack['Front Edge'] = $cab->FrontEdge;
$rack['Timestamp'] = getAuditTimestamp($cab);
$rack['Notes'] = html_entity_decode(strip_tags($cab->Notes), ENT_COMPAT, 'UTF-8');
$invCab[$dc->DataCenterID][$cab->Location] = $rack;
}