本文整理汇总了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);
示例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;
}
示例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";
示例4: htmlspecialcharsbx
echo LANGUAGE_ID;
?>
&ID=<?php
echo $WEB_FORM_ID;
?>
'><?php
echo $WEB_FORM_ID;
?>
</a>] (<?php
echo htmlspecialcharsbx($arForm["SID"]);
?>
) <?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();
?>
示例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 {
示例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