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


PHP CAdminList::AddFilterError方法代码示例

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


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

示例1: switch

            switch ($_REQUEST['action']) {
                case "delete":
                    if (CForumSubscribe::CanUserDeleteSubscribe($ID, $USER->GetUserGroupArray(), $USER->GetID())) {
                        CForumSubscribe::Delete($ID);
                    } else {
                        $arMsg[] = array("id" => "NO_PERMS", "text" => GetMessage("FSUBSC_NO_SPERMS"));
                    }
                    break;
            }
        }
    }
}
//************************************/Actions ********************************************************************
if (!empty($arMsg)) {
    $err = new CAdminException($arMsg);
    $lAdmin->AddFilterError($err->GetString());
}
$rsData = CForumSubscribe::GetListEx(array($by => $order), $arFilter);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("FM_TITLE_PAGE")));
//************************************ Headers ********************************************************************
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => GetMessage("FM_HEAD_ID"), "sort" => "ID", "default" => true), array("id" => "FORUM_NAME", "content" => GetMessage("FM_HEAD_FORUM"), "sort" => "FORUM_NAME", "default" => true), array("id" => "TITLE", "content" => GetMessage("FM_HEAD_TOPIC"), "sort" => "TITLE", "default" => true), array("id" => "START_DATE", "content" => GetMessage("FM_HEAD_START_DATE"), "sort" => "START_DATE", "default" => true), array("id" => "LAST_SEND", "content" => GetMessage("FM_HEAD_LAST_SEND"), "sort" => "LAST_SEND", "default" => true)));
//************************************ Body ***********************************************************************
while ($arRes = $rsData->NavNext(true, "t_")) {
    $row =& $lAdmin->AddRow($t_ID, $arRes);
    $LOGIN = $arRes["LOGIN"];
    if ($t_TOPIC_ID <= 0) {
        $t_TITLE = $t_NEW_TOPIC_ONLY == "Y" ? GetMessage("FM_NEW_TOPIC_ONLY") : GetMessage("FM_ALL_MESSAGE");
    }
    $row->AddViewField("TITLE", $t_TITLE);
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:forum_subscribe_edit.php

示例2: CheckDateFilter

function CheckDateFilter(CAdminList $lAdmin, $date_from, $date_to)
{
    $date_from = trim($date_from);
    $date_to = trim($date_to);
    if (strlen($date_from) > 0 || strlen($date_to) > 0) {
        $date_1_ok = false;
        $date1_stm = MkDateTime(FmtDate($date_from, "D.M.Y"), "d.m.Y");
        $date2_stm = MkDateTime(FmtDate($date_to, "D.M.Y") . " 23:59", "d.m.Y H:i");
        if (!$date1_stm && strlen(trim($date_from)) > 0) {
            $lAdmin->AddFilterError(GetMessage("POST_WRONG_TIMESTAMP_FROM"));
        } else {
            $date_1_ok = true;
        }
        if (!$date2_stm && strlen(trim($date_to)) > 0) {
            $lAdmin->AddFilterError(GetMessage("POST_WRONG_TIMESTAMP_TILL"));
        } elseif ($date_1_ok && $date2_stm <= $date1_stm && strlen($date2_stm) > 0) {
            $lAdmin->AddFilterError(GetMessage("POST_FROM_TILL_TIMESTAMP"));
        }
    }
    return count($lAdmin->arFilterErrors) == 0;
}
开发者ID:spas-viktor,项目名称:books,代码行数:21,代码来源:posting_admin.php

示例3: CAdminException

}
if (!empty($date1_create_stm)) {
    $arFilter[">=START_DATE"] = $CREATE_DATE_FROM;
}
if (!empty($date2_create_stm)) {
    $arFilter["<=START_DATE"] = $CREATE_DATE_TO;
}
if (!empty($date1_stm)) {
    $arFilter[">=LAST_POST_DATE"] = $DATE_FROM;
}
if (!empty($date2_stm)) {
    $arFilter["<=LAST_POST_DATE"] = $DATE_TO;
}
if (!empty($arMsg)) {
    $err = new CAdminException($arMsg);
    $lAdmin->AddFilterError($err->GetString());
}
/*******************************************************************/
if ($lAdmin->EditAction() && $forumModulePermissions >= "R") {
    $sError = "";
    $sOk = "";
    foreach ($FIELDS as $ID => $arFields) {
        $ID = intVal($ID);
        if (!$lAdmin->IsUpdated($ID)) {
            continue;
        } elseif (!CForumTopic::CanUserUpdateTopic($ID, $USER->GetUserGroupArray(), $USER->GetID())) {
            continue;
        }
        $res = CForumTopic::GetById($ID, array("NoFilter" => true));
        if (is_set($arFields, "APPROVED")) {
            $arFields["APPROVED"] = $arFields["APPROVED"] == "N" ? "N" : "Y";
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:forum_topics.php

示例4: htmlspecialcharsbx

echo LANGUAGE_ID;
?>
&ID=<?php 
echo $WEB_FORM_ID;
?>
'><?php 
echo $WEB_FORM_ID;
?>
</a>]&nbsp;(<?php 
echo htmlspecialcharsbx($arForm["SID"]);
?>
)&nbsp;<?php 
echo htmlspecialcharsbx($arForm["NAME"]);
echo EndNote();
if ($strError) {
    $lAdmin->AddFilterError($strError);
}
?>
<form name="form1" method="GET" action="<?php 
echo $APPLICATION->GetCurPage();
?>
?">
<?php 
if ($additional == "Y") {
    $oFilter = new CAdminFilter($sTableID . "_filter", array(GetMessage("FORM_FL_ID"), GetMessage("FORM_FL_ACTIVE"), GetMessage("FORM_FL_SID"), GetMessage("FORM_FL_COMMENT"), GetMessage("FORM_FL_HTML_INC"), GetMessage("FORM_FL_EXCEL_INC"), GetMessage("FORM_FL_FILTER_INC"), GetMessage("FORM_FL_LOGIC")));
} else {
    $oFilter = new CAdminFilter($sTableID . "_filter", array(GetMessage("FORM_FL_ID"), GetMessage("FORM_FL_ACTIVE"), GetMessage("FORM_FL_SID"), GetMessage("FORM_FL_COMMENT"), GetMessage("FORM_FL_REQUIRED"), GetMessage("FORM_FL_HTML_INC"), GetMessage("FORM_FL_EXCEL_INC"), GetMessage("FORM_FL_FILTER_INC"), GetMessage("FORM_FL_LOGIC")));
}
$oFilter->Begin();
?>
开发者ID:Satariall,项目名称:izurit,代码行数:30,代码来源:form_field_list.php

示例5: CAdminSorting

}
IncludeModuleLangFile(__FILE__);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/forum/prolog.php";
$sTableID = "tbl_filter_dictionary_letter";
$oSort = new CAdminSorting($sTableID, "ID", "asc");
$lAdmin = new CAdminList($sTableID, $oSort);
$lAdmin->InitFilter(array("DICTIONARY_ID", "find_type", "find"));
/*******************************************************************/
$arFilter = array();
$find = trim($find);
if (strLen($find) > 0) {
    $arFilter["%" . htmlspecialcharsEx($find_type)] = "%" . $find . "%";
}
$DICTIONARY_ID = intVal($_REQUEST["DICTIONARY_ID"]);
if ($DICTIONARY_ID <= 0) {
    $lAdmin->AddFilterError(GetMessage("FLT_NOT_DICT"));
}
$arFilter["DICTIONARY_ID"] = $DICTIONARY_ID;
/*******************************************************************/
if ($lAdmin->EditAction()) {
    foreach ($FIELDS as $ID => $arFields) {
        $arFields = array_merge($arFields, array("DICTIONARY_ID" => $DICTIONARY_ID));
        $DB->StartTransaction();
        $ID = IntVal($ID);
        if (!$lAdmin->IsUpdated($ID)) {
            continue;
        }
        if (!CFilterLetter::Update($ID, $arFields)) {
            if ($ex = $APPLICATION->GetException()) {
                $lAdmin->AddUpdateError($ex->GetString(), $ID);
            } else {
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:forum_letter.php

示例6: htmlspecialcharsbx

        while ($i < $intNumFields) {
            $header[] = array("id" => $rsData->FieldName($i), "content" => $rsData->FieldName($i), "sort" => $rsData->FieldName($i), "default" => true, "align" => "left", "valign" => "top");
            $arFieldName[] = $rsData->FieldName($i);
            $i++;
        }
        $lAdmin->AddHeaders($header);
        $j = 0;
        while ($db_res = $rsData->Fetch()) {
            $row =& $lAdmin->AddRow("ID", $db_res);
            foreach ($arFieldName as $field_name) {
                $row->AddViewField($field_name, TxtToHtml($db_res[$field_name]));
            }
        }
    } else {
        foreach ($arErrors as $i => $strError) {
            $lAdmin->AddFilterError(GetMessage("SQL_QUERY_ERROR_1") . "<br>" . $strError);
        }
    }
}
if ($message != null) {
    $lAdmin->BeginPrologContent();
    echo $message->Show();
    $lAdmin->EndPrologContent();
}
$lAdmin->BeginEpilogContent();
?>
	<input type="hidden" name="query" id="query" value="<?php 
echo htmlspecialcharsbx($query);
?>
">
<?php 
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:sql.php


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