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


PHP CAdminList::AddGroupError方法代码示例

本文整理汇总了PHP中CAdminList::AddGroupError方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminList::AddGroupError方法的具体用法?PHP CAdminList::AddGroupError怎么用?PHP CAdminList::AddGroupError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CAdminList的用法示例。


在下文中一共展示了CAdminList::AddGroupError方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: while

     while ($arResult = $dbResultList->Fetch()) {
         $arID[] = $arResult['ID'];
     }
 }
 foreach ($arID as $ID) {
     if (strlen($ID) <= 0) {
         continue;
     }
     switch ($_REQUEST['action']) {
         case "delete":
             @set_time_limit(0);
             $DB->StartTransaction();
             if (!CSaleTaxRate::Delete($ID)) {
                 $DB->Rollback();
                 if ($ex = $APPLICATION->GetException()) {
                     $lAdmin->AddGroupError($ex->GetString(), $ID);
                 } else {
                     $lAdmin->AddGroupError(GetMessage("SALE_DELETE_ERROR"), $ID);
                 }
             }
             $DB->Commit();
             break;
         case "activate":
         case "deactivate":
             $arFields = array("ACTIVE" => $_REQUEST['action'] == "activate" ? "Y" : "N");
             if (!CSaleTaxRate::Update($ID, $arFields)) {
                 if ($ex = $APPLICATION->GetException()) {
                     $lAdmin->AddGroupError($ex->GetString(), $ID);
                 } else {
                     $lAdmin->AddGroupError(GetMessage("ERROR_EDIT_TAX_RATE"), $ID);
                 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:tax_rate.php

示例2: CCloudStorageBucket

						{
							$obBucket = new CCloudStorageBucket($BUCKET_ID);
							if ($obBucket->Init())
							{
								$name = $path.'/'.$item;
								while($obBucket->FileExists($name))
								{
									$file_size = $obBucket->GetFileSize($name);
									if ($obBucket->DeleteFile($name))
										$obBucket->DecFileCounter($file_size);
									$name = CTar::getNextName($name);
								}

								$e = $APPLICATION->GetException();
								if(is_object($e))
									$lAdmin->AddGroupError($e->GetString(), $ID);
							}
							else
								$lAdmin->AddGroupError(GetMessage("MAIN_DUMP_ERR_INIT_CLOUD"), $ID);
						}
					}
					else
					{
						while(file_exists(DOCUMENT_ROOT.$path.'/'.$item))
						{
							if ($strWarning_tmp = CFileMan::DeleteEx(Array($site, CFileMan::NormalizePath($path."/".$item))))
								$lAdmin->AddGroupError($strWarning_tmp, $ID);

							$item = CTar::getNextName($item);
						}
					}
开发者ID:nProfessor,项目名称:Mytb,代码行数:31,代码来源:dump.php

示例3: while

        while ($arRes = $rsData->Fetch()) {
            $arID[] = $arRes['ID'];
        }
    }
    foreach ($arID as $ID) {
        if (strlen($ID) <= 0) {
            continue;
        }
        $ID = IntVal($ID);
        $emessage = new CEventMessage();
        switch ($_REQUEST['action']) {
            case "delete":
                $DB->StartTransaction();
                if (!$emessage->Delete($ID)) {
                    $DB->Rollback();
                    $lAdmin->AddGroupError(GetMessage("DELETE_ERROR"), $ID);
                } else {
                    $DB->Commit();
                }
                break;
            case "activate":
            case "deactivate":
                $arFields = array("ACTIVE" => $_REQUEST['action'] == "activate" ? "Y" : "N");
                if (!$emessage->Update($ID, $arFields)) {
                    $lAdmin->AddGroupError(GetMessage("MAIN_EDIT_ERROR") . ':' . $emessage->LAST_ERROR, $ID);
                }
                break;
        }
    }
}
$rsData = CEventMessage::GetList($by, $order, $arFilter);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:message_admin.php

示例4: IntVal

{
	$obUserField = new CUserTypeEntity;
	foreach($FIELDS as $ID=>$arFields)
	{
		if(!$lAdmin->IsUpdated($ID))
			continue;
		//Rights check
		if($USER_FIELD_MANAGER->GetRights(false, $ID) < "W")
			continue;
		//Update
		$DB->StartTransaction();
		$ID = IntVal($ID);
		if(!$obUserField->Update($ID, $arFields))
		{
			if($e = $APPLICATION->GetException())
				$lAdmin->AddGroupError(GetMessage("USERTYPE_UPDATE_ERROR")." ".$e->GetString(), $ID);
			$DB->Rollback();
		}
		$DB->Commit();
	}
}

if($arID = $lAdmin->GroupAction())
{
	if($_REQUEST['action_target']=='selected')
	{
		$rsData = CUserTypeEntity::GetList(array($by=>$order), $arFilter);
		while($arRes = $rsData->Fetch())
			$arID[] = $arRes['ID'];
	}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:30,代码来源:userfield_admin.php

示例5: array

						'UserGroups' => $USER->GetUserGroupArray(),
					)
				);


				if ($bCanWrite)
					$bPermissions = true;
			}
			else
			{
				$bPermissions = true;
			}

			if(!$bPermissions)
			{
				$lAdmin->AddGroupError(GetMessage("IBLIST_A_UPDERR_ACCESS", array("#ID#" => $ID)));
				continue;
			}

		}

		switch($_REQUEST['action'])
		{
		case "delete":
			@set_time_limit(0);
			if($TYPE=="S")
			{
				if(CIBlockSectionRights::UserHasRightTo($IBLOCK_ID, $ID, "section_delete"))
				{
					$DB->StartTransaction();
					$APPLICATION->ResetException();
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:iblock_list_admin.php

示例6: while

    if ($_REQUEST['action_target'] == 'selected') {
        $rsData = CCurrency::GetList($by, $order);
        while ($arRes = $rsData->Fetch()) {
            $arID[] = $arRes['ID'];
        }
    }
    foreach ($arID as $ID) {
        if (strlen($ID) <= 0) {
            continue;
        }
        switch ($_REQUEST['action']) {
            case "delete":
                if ($CURRENCY_RIGHT == "W") {
                    if (!CCurrency::Delete($ID)) {
                        if ($ex = $APPLICATION->GetException()) {
                            $lAdmin->AddGroupError($ex->GetString(), $ID);
                        } else {
                            $lAdmin->AddGroupError(GetMessage("currency_err1"), $ID);
                        }
                    }
                }
                break;
        }
    }
}
$rsData = CCurrency::GetList($by, $order);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("CURRENCY_TITLE")));
$arHeaders = array();
$arHeaders[] = array("id" => "CURRENCY", "content" => GetMessage('currency_curr'), "sort" => "CURRENCY", "default" => true);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:currencies.php

示例7: array

        $arID = array();
        $dbResultList = CSupportTimetable::GetList(array($by => $order), $arFilter);
        while ($arResult = $dbResultList->Fetch()) {
            $arID[] = $arResult['ID'];
        }
    }
    foreach ($arID as $ID) {
        if (strlen($ID) <= 0) {
            continue;
        }
        switch ($_REQUEST['action']) {
            case "delete":
                @set_time_limit(0);
                if (!CSupportTimetable::Delete($ID)) {
                    if ($e = $APPLICATION->GetException()) {
                        $lAdmin->AddGroupError($e->GetString(), $ID);
                    }
                }
                break;
        }
    }
}
$arHeaders = array(array("id" => "ID", "content" => "ID", "sort" => "ID", "default" => true), array("id" => "NAME", "content" => GetMessage("SUP_NAME"), "sort" => "NAME", "default" => true), array("id" => "DESCRIPTION", "content" => GetMessage('SUP_DESCRIPTION'), "default" => true));
$USER_FIELD_MANAGER->AdminListAddHeaders("TIMETABLE", $arHeaders);
$lAdmin->AddHeaders($arHeaders);
$arVisibleColumns = $lAdmin->GetVisibleHeaderColumns();
$arSelectedFields = array("ID", "NAME", "DESCRIPTION");
foreach ($arVisibleColumns as $val) {
    if (!in_array($val, $arSelectedFields)) {
        $arSelectedFields[] = $val;
    }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:ticket_timetable_list.php

示例8: array

	if (!empty($listID))
	{
		switch ($_REQUEST['action'])
		{
			case 'activate':
			case 'deactivate':
				Internals\DiscountCouponTable::disableCheckCouponsUse();
				$fields = array(
					'ACTIVE' => ($_REQUEST['action'] == 'activate' ? 'Y' : 'N')
				);
				foreach ($listID as &$couponID)
				{
					$result = Internals\DiscountCouponTable::update($couponID, $fields);
					if (!$result->isSuccess())
					{
						$adminList->AddGroupError(implode('<br>', $result->getErrorMessages(), $couponID));
					}
				}
				unset($couponID, $fields);
				Internals\DiscountCouponTable::enableCheckCouponsUse();
				break;
			case 'delete':
				if (empty($discountList))
				{
					$couponIterator = Internals\DiscountCouponTable::getList(array(
						'select' => array('ID', 'DISCOUNT_ID'),
						'filter' => array('ID' => $listID)
					));
					while ($coupon = $couponIterator->fetch())
					{
						$discountList[$coupon['DISCOUNT_ID']] = true;;
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:discount_coupons.php

示例9: foreach

         $arID[] = $arRes['ID'];
     }
 }
 foreach ($arID as $ID) {
     if (strlen($ID) <= 0) {
         continue;
     }
     $ID = intval($ID);
     switch ($_REQUEST['action']) {
         case "delete":
             @set_time_limit(0);
             $DB->StartTransaction();
             $cl = new CLQuestion();
             if (!$cl->Delete($ID)) {
                 $DB->Rollback();
                 $lAdmin->AddGroupError(GetMessage("LEARNING_DELETE_ERROR"), $ID);
             }
             $DB->Commit();
             break;
         case "self":
         case "deself":
             // We shouldn't do this for text lessons
             $rs = CLQuestion::GetByID($ID);
             $arQuestionData = $rs->Fetch();
             if ($arQuestionData) {
                 if ($arQuestionData['QUESTION_TYPE'] !== 'T') {
                     $cl = new CLQuestion();
                     $arFields = array("SELF" => $_REQUEST['action'] == "self" ? "Y" : "N");
                     if (!$cl->Update($ID, $arFields)) {
                         if ($e = $APPLICATION->GetException()) {
                             $lAdmin->AddGroupError(GetMessage("SAVE_ERROR") . $ID . ": " . $e->GetString(), $ID);
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:learn_question_admin.php

示例10: foreach

 foreach ($arID as $ID) {
     if (strlen($ID) <= 0) {
         continue;
     }
     $ID = intval($ID);
     switch ($_REQUEST['action']) {
         case "delete":
             $oAccess = CLearnAccess::GetInstance($USER->GetID());
             if (!$oAccess->IsLessonAccessible(CCertification::LessonIdByCertId($ID), CLearnAccess::OP_LESSON_WRITE)) {
                 break;
             }
             @set_time_limit(0);
             $DB->StartTransaction();
             if (!CCertification::Delete($ID)) {
                 $DB->Rollback();
                 $lAdmin->AddGroupError(GetMessage("LEARNING_DELETE_ERROR"), $ID);
             }
             $DB->Commit();
             break;
         case "activate":
         case "deactivate":
             $cl = new CCertification();
             $arFields = array("ACTIVE" => $_REQUEST['action'] == "activate" ? "Y" : "N");
             if (!$cl->Update($ID, $arFields)) {
                 if ($e = $APPLICATION->GetException()) {
                     $lAdmin->AddGroupError(GetMessage("SAVE_ERROR") . $ID . ": " . $e->GetString(), $ID);
                 }
             }
             break;
     }
 }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:learn_certification_admin.php

示例11: basename

                 $arID[] = '0_' . basename($f);
             }
             closedir($dir);
         }
     }
     if ($arAllBucket) {
         foreach ($arAllBucket as $arBucket) {
             if ($arCloudFiles = CBackup::GetBucketFileList($arBucket['ID'], BX_ROOT . '/backup/')) {
                 foreach ($arCloudFiles['file'] as $k => $v) {
                     $arID[] = $arBucket['ID'] . '_' . $v;
                 }
             }
         }
     }
     if ($bBitrixCloud) {
         $lAdmin->AddGroupError(GetMessage("MAIN_DUMP_ERR_DELETE"), '');
     }
 }
 $bBitrixCloudDelete = false;
 foreach ($arID as $ID) {
     if (strlen($ID) <= 0) {
         continue;
     }
     switch ($_REQUEST['action']) {
         case "delete":
             if (preg_match('#^(-?[0-9]+)_(.+)$#', $ID, $regs)) {
                 $BUCKET_ID = $regs[1];
                 $item = $regs[2];
                 if ($BUCKET_ID == -1) {
                     if (!$bBitrixCloudDelete) {
                         $lAdmin->AddGroupError(GetMessage("MAIN_DUMP_ERR_DELETE"), $ID);
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:dump_list.php

示例12: while

    if ($_REQUEST['action_target'] == 'selected') {
        $rsData = CIBlockType::GetList($arOrder, $arFilter);
        while ($arRes = $rsData->Fetch()) {
            $arID[] = $arRes['ID'];
        }
    }
    foreach ($arID as $ID) {
        if (strlen($ID) <= 0) {
            continue;
        }
        switch ($_REQUEST['action']) {
            case "delete":
                $DB->StartTransaction();
                if (!CIBlockType::Delete($ID)) {
                    $DB->Rollback();
                    $lAdmin->AddGroupError(GetMessage("IBLOCK_TYPE_ADMIN_ERR_DEL") . " (&quot;" . htmlspecialcharsbx($ID) . "&quot;)", $ID);
                }
                $DB->Commit();
                break;
        }
    }
}
// Fill list with data
$rsData = CIBlockType::GetList($arOrder, $arFilter);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
// Set page navigation
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("IBLOCK_TYPE_ADMIN_NAV")));
// List headers/columns
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "id", "default" => true), array("id" => "NAME", "content" => GetMessage("IBLOCK_TYPE_ADMIN_COL_NAME"), "default" => true), array("id" => "SORT", "content" => GetMessage("IBLOCK_TYPE_ADMIN_COL_SORT"), "sort" => "sort", "default" => true, "align" => "right"), array("id" => "SECTIONS", "content" => GetMessage("IBLOCK_TYPE_ADMIN_COL_SECT"), "default" => true, "align" => "center"), array("id" => "IN_RSS", "content" => GetMessage("IBLOCK_TYPE_ADMIN_COL_RSS"), "default" => true, "align" => "center"), array("id" => "EDIT_FILE_BEFORE", "content" => GetMessage("IBLOCK_TYPE_ADMIN_COL_EDIT_BEF")), array("id" => "EDIT_FILE_AFTER", "content" => GetMessage("IBLOCK_TYPE_ADMIN_COL_EDIT_AFT"))));
// Build elements list
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:iblock_type_admin.php

示例13:

			catch(Engine\YandexDirectException $e)
			{
				Adv\YandexBannerTable::setSkipRemoteUpdate(false);
			}

			foreach($bannersList as $bannerId)
			{
				try
				{
					$result = Adv\YandexBannerTable::delete($bannerId);
					if(!$result->isSuccess())
					{
						$errorsList = $result->getErrorMessages();
						foreach($errorsList as $errorMessage)
						{
							$adminList->AddGroupError($errorMessage, $bannerId);
						}
					}
				}
				catch(Engine\YandexDirectException $e)
				{
					if($e->getCode() == Engine\YandexDirect::ERROR_NOT_FOUND)
					{
						Adv\YandexBannerTable::setSkipRemoteUpdate(true);
						$result = Adv\YandexBannerTable::delete($bannerId);
						if(!$result->isSuccess())
						{
							$errorsList = $result->getErrorMessages();
							foreach($errorsList as $errorMessage)
							{
								$adminList->AddGroupError($errorMessage, $bannerId);
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:seo_search_yandex_direct_banner.php

示例14: while

     while ($arRes = $rsData->Fetch()) {
         $arID[] = $arRes['ID'];
     }
 }
 foreach ($arID as $ID) {
     if (strlen($ID) <= 0) {
         continue;
     }
     $ID = IntVal($ID);
     switch ($_REQUEST['action']) {
         case "delete":
             @set_time_limit(0);
             $DB->StartTransaction();
             if (!CSubscription::Delete($ID)) {
                 $DB->Rollback();
                 $lAdmin->AddGroupError(GetMessage("subscr_del_err"), $ID);
             }
             $DB->Commit();
             break;
         case "activate":
         case "deactivate":
             $ob = new CSubscription();
             $arFields = array("ACTIVE" => $_REQUEST['action'] == "activate" ? "Y" : "N");
             if (!$ob->Update($ID, $arFields)) {
                 $lAdmin->AddGroupError(GetMessage("subscr_save_error") . $ob->LAST_ERROR, $ID);
             }
             break;
         case "confirm":
             $ob = new CSubscription();
             $arFields = array("CONFIRMED" => "Y");
             if (!$ob->Update($ID, $arFields)) {
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:subscr_admin.php

示例15: while

        while ($arRes = $rsData->Fetch()) {
            $arID[] = $arRes['ID'];
        }
    }
    foreach ($arID as $ID) {
        if (strlen($ID) <= 0) {
            continue;
        }
        $ID = IntVal($ID);
        switch ($_REQUEST['action']) {
            case "delete":
                @set_time_limit(0);
                $DB->StartTransaction();
                if (!CMailBox::Delete($ID)) {
                    $DB->Rollback();
                    $lAdmin->AddGroupError(GetMessage("MAIL_MBOX_ADM_DELERR"), $ID);
                }
                $DB->Commit();
                break;
            case "activate":
            case "deactivate":
                $arFields = array("ACTIVE" => $_REQUEST['action'] == "activate" ? "Y" : "N");
                if (!CMailBox::Update($ID, $arFields)) {
                    if ($e = $APPLICATION->GetException()) {
                        $lAdmin->AddGroupError(GetMessage("SAVE_ERROR") . $ID . ": " . $e->GetString(), $ID);
                    }
                }
                break;
        }
    }
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:mail_mailbox_admin.php


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