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


PHP CSaleStatus::GetPermissionsList方法代码示例

本文整理汇总了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;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:24,代码来源:order.php

示例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);
 }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:wizard.php


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