本文整理汇总了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();
}
示例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]);
}
}
}
示例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);
}
示例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);
}
示例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));
}
}
示例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();
}