當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CMain::DelGroupRight方法代碼示例

本文整理匯總了PHP中CMain::DelGroupRight方法的典型用法代碼示例。如果您正苦於以下問題:PHP CMain::DelGroupRight方法的具體用法?PHP CMain::DelGroupRight怎麽用?PHP CMain::DelGroupRight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CMain的用法示例。


在下文中一共展示了CMain::DelGroupRight方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: unRegisterModule

 public static function unRegisterModule($moduleName)
 {
     $con = Application::getInstance()->getConnection();
     $con->queryExecute("DELETE FROM b_agent WHERE MODULE_ID='" . $con->getSqlHelper()->forSql($moduleName) . "'");
     \CMain::DelGroupRight($moduleName);
     static::delete($moduleName);
     $event = new Event("main", "OnAfterUnRegisterModule", array($moduleName));
     $event->send();
 }
開發者ID:ASDAFF,項目名稱:open_bx,代碼行數:9,代碼來源:modulemanager.php

示例2: SaveGroupRight

 private function SaveGroupRight()
 {
     CMain::DelGroupRight($this->module_id);
     $GROUP = $_REQUEST['GROUPS'];
     $RIGHT = $_REQUEST['RIGHTS'];
     foreach ($GROUP as $k => $v) {
         if ($k == 0) {
             COption::SetOptionString($this->module_id, 'GROUP_DEFAULT_RIGHT', $RIGHT[0], 'Right for groups by default');
         } else {
             CMain::SetGroupRight($this->module_id, $GROUP[$k], $RIGHT[$k]);
         }
     }
 }
開發者ID:Black-Core-Sec,項目名稱:sd,代碼行數:13,代碼來源:CModuleOptions.php

示例3: Delete

 function Delete($ID)
 {
     global $APPLICATION, $DB;
     $ID = IntVal($ID);
     if ($ID <= 2) {
         return false;
     }
     @set_time_limit(600);
     $bCanDelete = true;
     $db_events = GetModuleEvents("main", "OnBeforeGroupDelete");
     while ($arEvent = $db_events->Fetch()) {
         if (ExecuteModuleEventEx($arEvent, array($ID)) === false) {
             $err = GetMessage("MAIN_BEFORE_DEL_ERR") . ' ' . $arEvent['TO_NAME'];
             if ($ex = $APPLICATION->GetException()) {
                 $err .= ': ' . $ex->GetString();
             }
             $APPLICATION->throwException($err);
             return false;
         }
     }
     //проверка - оставил ли тут какой-нибудь модуль обработчик на OnDelete
     $events = GetModuleEvents("main", "OnGroupDelete");
     while ($arEvent = $events->Fetch()) {
         ExecuteModuleEventEx($arEvent, array($ID));
     }
     CMain::DelGroupRight("", array($ID));
     if (!$DB->Query("DELETE FROM b_user_group WHERE GROUP_ID=" . $ID . " AND GROUP_ID>2", true)) {
         return false;
     }
     return $DB->Query("DELETE FROM b_group WHERE ID=" . $ID . " AND ID>2", true);
 }
開發者ID:,項目名稱:,代碼行數:31,代碼來源:

示例4: Delete

 function Delete($ID)
 {
     /** @global CMain $APPLICATION */
     global $APPLICATION, $DB;
     $ID = intval($ID);
     if ($ID <= 2) {
         return false;
     }
     @set_time_limit(600);
     foreach (GetModuleEvents("main", "OnBeforeGroupDelete", true) as $arEvent) {
         if (ExecuteModuleEventEx($arEvent, array($ID)) === false) {
             $err = GetMessage("MAIN_BEFORE_DEL_ERR") . ' ' . $arEvent['TO_NAME'];
             if ($ex = $APPLICATION->GetException()) {
                 $err .= ': ' . $ex->GetString();
             }
             $APPLICATION->throwException($err);
             return false;
         }
     }
     foreach (GetModuleEvents("main", "OnGroupDelete", true) as $arEvent) {
         ExecuteModuleEventEx($arEvent, array($ID));
     }
     CMain::DelGroupRight("", array($ID));
     if (!$DB->Query("DELETE FROM b_user_group WHERE GROUP_ID=" . $ID . " AND GROUP_ID>2", true)) {
         return false;
     }
     return $DB->Query("DELETE FROM b_group WHERE ID=" . $ID . " AND ID>2", true);
 }
開發者ID:nProfessor,項目名稱:Mytb,代碼行數:28,代碼來源:user.php

示例5: UnRegisterModule

function UnRegisterModule($id)
{
    global $DB;
    $DB->Query("DELETE FROM b_agent WHERE MODULE_ID='" . $DB->ForSQL($id) . "'");
    CMain::DelGroupRight($id);
    $m = new CModule();
    $m->MODULE_ID = $id;
    $m->Remove();
    $res = GetModuleEvents("main", "OnAfterUnRegisterModule");
    while ($arEvent = $res->Fetch()) {
        ExecuteModuleEventEx($arEvent, array($id));
    }
}
開發者ID:,項目名稱:,代碼行數:13,代碼來源:

示例6: UnRegisterModule

function UnRegisterModule($id)
{
	global $DB;
	$DB->Query("DELETE FROM b_agent WHERE MODULE_ID='".$DB->ForSQL($id)."'");
	CMain::DelGroupRight($id);
	$m = new CModule;
	$m->MODULE_ID = $id;
	$m->Remove();
}
開發者ID:nProfessor,項目名稱:Mytb,代碼行數:9,代碼來源:module.php


注:本文中的CMain::DelGroupRight方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。