本文整理匯總了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();
}