本文整理汇总了PHP中CSaleStatus::GetPermissionsList方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleStatus::GetPermissionsList方法的具体用法?PHP CSaleStatus::GetPermissionsList怎么用?PHP CSaleStatus::GetPermissionsList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleStatus
的用法示例。
在下文中一共展示了CSaleStatus::GetPermissionsList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CanUserDeleteOrder
function CanUserDeleteOrder($ID, $arUserGroups = false, $userID = 0)
{
$ID = IntVal($ID);
$userID = IntVal($userID);
$userRights = CMain::GetUserRight("sale", $arUserGroups, "Y", "Y");
if ($userRights >= "W") {
return True;
}
if ($userRights == "U") {
$arOrder = CSaleOrder::GetByID($ID);
if ($arOrder) {
$num = CSaleGroupAccessToSite::GetList(array(), array("SITE_ID" => $arOrder["LID"], "GROUP_ID" => $arUserGroups), array());
if (IntVal($num) > 0) {
$dbStatusPerms = CSaleStatus::GetPermissionsList(array(), array("STATUS_ID" => $arOrder["STATUS_ID"], "GROUP_ID" => $arUserGroups), array("MAX" => "PERM_DELETE"));
if ($arStatusPerms = $dbStatusPerms->Fetch()) {
if ($arStatusPerms["PERM_DELETE"] == "Y") {
return True;
}
}
}
}
}
return False;
}
示例2: InitStep
function InitStep()
{
$groupID = array();
$this->SetTitle(GetMessage("WW_STEP6"));
$this->SetSubTitle("");
$this->SetNextStep("step7");
$this->SetPrevStep("step5");
$this->SetFinishStep("final");
$this->SetStepID("step6");
$this->SetCancelStep("final");
$wizard =& $this->GetWizard();
$siteID = $wizard->GetVar("siteID");
$groupID = $wizard->GetVar("groupID");
if (empty($groupID)) {
$groupID = array();
}
$arPermType = array("PERM_VIEW", "PERM_CANCEL", "PERM_MARK", "PERM_DEDUCTION", "PERM_DELIVERY", "PERM_PAYMENT", "PERM_STATUS", "PERM_STATUS_FROM", "PERM_UPDATE", "PERM_DELETE");
//$dbStatus = CSaleStatus::GetList(Array("SORT" => "ASC"), Array("LID" => $siteID), false, false, array("ID", "SORT", "LID", "NAME", "DESCRIPTION"));
$dbStatus = CSaleStatus::GetList(array("SORT" => "ASC"), array(), false, false, array("ID", "SORT", "LID", "NAME", "DESCRIPTION"));
while ($arStatus = $dbStatus->Fetch()) {
foreach ($groupID as $gr) {
$dbPermsMatrix = CSaleStatus::GetPermissionsList(array(), array("STATUS_ID" => $arStatus["ID"], "GROUP_ID" => $gr), false, false, array());
while ($arPM = $dbPermsMatrix->Fetch()) {
foreach ($arPermType as $perm) {
$defVars["perm[" . $arStatus["ID"] . "][" . $arPM["GROUP_ID"] . "][" . $perm . "]"] = $arPM[$perm];
}
}
}
}
$wizard->SetDefaultVars($defVars);
}