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


PHP Cabinet::DeleteCabinet方法代码示例

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


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

示例1: array

    }
    return array($noTemplFlag, $noOwnerFlag, $retstr);
}
$cab = new Cabinet();
$cab->CabinetID = $_REQUEST["cabinetid"];
$cab->GetCabinet();
// Check to see if this user is allowed to see anything in ihere
if (!$person->SiteAdmin && !$person->ReadAccess && $cab->Rights == 'None' && !array_intersect($person->isMemberOf(), Cabinet::GetOccupants($cab->CabinetID))) {
    // This cabinet belongs to a department you don't have affiliation with, so no viewing at all
    header('Location: ' . redirect());
    exit;
}
// If you're deleting the cabinet, no need to pull in the rest of the information, so get it out of the way
// Only a site administrator can create or delete a cabinet
if (isset($_POST["delete"]) && $_POST["delete"] == "yes" && $person->SiteAdmin) {
    $cab->DeleteCabinet();
    header('Content-Type: application/json');
    echo json_encode(array('url' => redirect("dc_stats.php?dc={$cab->DataCenterID}")));
    exit;
}
$head = $legend = $zeroheight = $body = $deptcolor = $AuditorName = "";
$audit = new CabinetAudit();
$dev = new Device();
$pdu = new PowerDistribution();
$pan = new PowerPanel();
$templ = new DeviceTemplate();
$tempPDU = new PowerDistribution();
$tempDept = new Department();
$dc = new DataCenter();
$dcID = $cab->DataCenterID;
$dc->DataCenterID = $dcID;
开发者ID:olivierbeytrison,项目名称:openDCIM,代码行数:31,代码来源:cabnavigator.php


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