本文整理汇总了PHP中CAdminFilter::AddPreset方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminFilter::AddPreset方法的具体用法?PHP CAdminFilter::AddPreset怎么用?PHP CAdminFilter::AddPreset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminFilter
的用法示例。
在下文中一共展示了CAdminFilter::AddPreset方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetMessage
$APPLICATION->SetTitle(GetMessage("BPATL_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
?>
<form name="find_form" method="GET" action="<?php
echo $APPLICATION->GetCurPage();
?>
?">
<?php
$ar = array(GetMessage("BPATL_F_MODIFIED"), GetMessage("BPATL_F_NAME"), GetMessage("BPATL_DESCR"), GetMessage("BPATL_FILTER_STATUS"), GetMessage("BPATL_WORKFLOW_NAME"));
if ($allowAdminAccess) {
$ar[] = GetMessage("BPATL_USER_ID");
}
$oFilter = new CAdminFilter($sTableID . "_filter", $ar);
$oFilter->SetDefaultRows(array("filter_modified_1", 'filter_name'));
$oFilter->AddPreset(array("ID" => "filter_running", "NAME" => GetMessage("BPATL_FILTER_STATUS_RUNNING"), "FIELDS" => array("filter_status" => 0)));
$oFilter->AddPreset(array("ID" => "filter_complete", "NAME" => GetMessage("BPATL_FILTER_STATUS_COMPLETE"), "FIELDS" => array("filter_status" => 1)));
$oFilter->AddPreset(array("ID" => "filter_all", "NAME" => GetMessage("BPATL_FILTER_STATUS_ALL"), "FIELDS" => array("filter_status" => 2)));
$oFilter->Begin();
?>
<tr>
<td><?php
echo GetMessage("BPATL_F_MODIFIED");
?>
:</td>
<td><?php
echo CalendarPeriod("filter_modified_1", htmlspecialcharsbx($filter_modified_1), "filter_modified_2", htmlspecialcharsbx($filter_modified_2), "find_form", "Y");
?>
</td>
</tr>
<tr>
示例2: unset
if (is_set($arActions[count($arActions) - 1], "SEPARATOR")) {
unset($arActions[count($arActions) - 1]);
}
$row->AddActions($arActions);
}
$lAdmin->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $rsData->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
$lAdmin->AddGroupActionTable(array("delete" => GetMessage("MAIN_ADMIN_LIST_DELETE")));
$aContext = array(array("TEXT" => GetMessage("SENDER_CONTACT_LIST_BUTTON_ADD"), "TITLE" => GetMessage("POST_ADD_TITLE"), "ICON" => "btn_new", "MENU" => array(array("TEXT" => GetMessage("SENDER_CONTACT_LIST_BUTTON_ADD_FORM"), "ACTION" => $lAdmin->ActionRedirect("sender_contact_edit.php?lang=" . LANGUAGE_ID)), array("TEXT" => GetMessage("SENDER_CONTACT_LIST_BUTTON_ADD_LIST"), "ACTION" => $lAdmin->ActionRedirect("sender_contact_import.php?lang=" . LANGUAGE_ID)), array("TEXT" => GetMessage("SENDER_CONTACT_LIST_BUTTON_ADD_FILE"), "ACTION" => $lAdmin->ActionRedirect("sender_contact_import.php?lang=" . LANGUAGE_ID)), $POST_RIGHT >= "W" ? array("TEXT" => GetMessage("SENDER_CONTACT_LIST_BUTTON_ADD_PULL1"), "ACTION" => $lAdmin->ActionRedirect("sender_contact_admin.php?action=pull&lang=" . LANGUAGE_ID)) : null)));
$aContext[] = array("TEXT" => GetMessage("SENDER_CONTACT_LIST_EDIT"), "LINK" => "/bitrix/admin/sender_list_admin.php?lang=" . LANG, "TITLE" => GetMessage("SENDER_CONTACT_LIST_EDIT_TITLE"), "ICON" => "");
$lAdmin->AddAdminContextMenu($aContext);
$lAdmin->CheckListMode();
$APPLICATION->SetTitle(GetMessage("rub_title"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$oFilter = new CAdminFilter($sTableID . "_filter", array(GetMessage("rub_f_name"), GetMessage("rub_f_email"), GetMessage("rub_f_subscribed"), GetMessage("rub_f_unsubscribed"), GetMessage("rub_f_list")));
$oFilter->SetDefaultRows(array("find_email", "find_list"));
$oFilter->AddPreset(array("ID" => "subscribed_list", "NAME" => GetMessage('SENDER_CONTACT_LIST_PRESET_SUB'), "FIELDS" => array("find_email" => "", "find_subscribed" => "ALL")));
$oFilter->AddPreset(array("ID" => "unsubscribed_list", "NAME" => GetMessage('SENDER_CONTACT_LIST_PRESET_UN_SUB'), "FIELDS" => array("find_email" => "", "find_unsubscribed" => "ALL")));
$filterMailingSubList = array('reference' => array(GetMessage('rub_f_yes')), 'reference_id' => array('ALL'));
$filterMailingUnSubList = array('reference' => array(GetMessage('rub_f_yes')), 'reference_id' => array('ALL'));
$mailingDb = \Bitrix\Sender\MailingTable::getList(array('select' => array('IS_TRIGGER', 'REFERENCE' => 'NAME', 'REFERENCE_ID' => 'ID')));
while ($arMailing = $mailingDb->fetch()) {
if ($arMailing['IS_TRIGGER'] != 'Y') {
$filterMailingSubList['reference'][] = $arMailing['REFERENCE'];
$filterMailingSubList['reference_id'][] = $arMailing['REFERENCE_ID'];
}
$filterMailingUnSubList['reference'][] = $arMailing['REFERENCE'];
$filterMailingUnSubList['reference_id'][] = $arMailing['REFERENCE_ID'];
}
?>
<form name="find_form" method="get" action="<?php
echo $APPLICATION->GetCurPage();
示例3: GetMessage
$lAdmin->AddFooter($arFooterArray);
$aContext = array();
$lAdmin->AddAdminContextMenu($aContext);
$lAdmin->CheckListMode();
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/prolog.php";
$APPLICATION->SetTitle(GetMessage("SB_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
?>
<form name="find_form" method="GET" action="<?php
echo $APPLICATION->GetCurPage();
?>
?">
<?php
$oFilter = new CAdminFilter($sTableID . "_filter", array("find_universal" => GetMessage("SB_UNIVERSAL"), "find_user" => GetMessage("SB_FUSER_ID"), "find_user_login" => GetMessage("SB_USER_LOGIN"), "find_price" => GetMessage("SB_PRICE_ALL"), "find_quantity" => GetMessage("SB_QUANTITY_ALL"), "find_cnt" => GetMessage("SB_CNT"), "find_bt" => GetMessage("SB_BASKET_TYPE"), "find_di" => GetMessage("SB_DATE_INSERT"), "find_du" => GetMessage("SB_DATE_UPDATE"), "find_pi" => GetMessage("SB_PRODUCT_ID"), "find_cur" => GetMessage("SB_CURRENCY"), "find_ug" => GetMessage("SB_USER_GROUP_ID"), "find_lid" => GetMessage("SB_LID")));
$oFilter->SetDefaultRows(array("find_universal", "find_price", "find_ug", "find_quantity"));
$oFilter->AddPreset(array("ID" => "find_1", "NAME" => GetMessage("SB_FILTER_WEEK"), "FIELDS" => array("filter_date_update_from_FILTER_PERIOD" => "week", "filter_date_update_from_FILTER_DIRECTION" => "previous", "filter_date_update_from" => ConvertTimeStamp(AddToTimeStamp(array("DD" => -7)))), "SORT_FIELD" => array("PRICE_ALL" => "DESC")));
$oFilter->AddPreset(array("ID" => "find_2", "NAME" => GetMessage("SB_FILTER_ALL"), "FIELDS" => array("find_user" => ""), "SORT_FIELD" => array("PRICE_ALL" => "DESC")));
$oFilter->AddPreset(array("ID" => "find_3", "NAME" => GetMessage("SB_FILTER_PRD"), "FIELDS" => array("find_user" => ""), "SORT_FIELD" => array("PR_COUNT" => "DESC")));
$oFilter->Begin();
?>
<tr>
<td><?php
echo GetMessage("SB_UNIVERSAL");
?>
:</td>
<td>
<input type="text" name="filter_universal" value="<?php
echo htmlspecialcharsbx($filter_universal);
?>
" size="40">
</td>
示例4: GetMessage
$arFooterArray = array(array("title" => GetMessage('MAIN_ADMIN_LIST_SELECTED'), "value" => $dbUsersList->SelectedRowsCount()));
$lAdmin->AddFooter($arFooterArray);
$aContext = array();
$lAdmin->AddAdminContextMenu($aContext);
$lAdmin->CheckListMode();
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/prolog.php";
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
?>
<form name="find_form" method="GET" action="<?php
echo $APPLICATION->GetCurPage();
?>
?">
<?php
$oFilter = new CAdminFilter($sTableID . "_filters", array("filter_universal" => GetMessage("BUYER_ROW_BUYER"), "filter_ID" => GetMessage("BUYER_F_ID"), "filter_login" => GetMessage("BUYER_F_LOGIN"), "filter_mail" => GetMessage("BUYER_F_MAIL"), "filter_phone" => GetMessage("BUYER_F_PHONE"), "find_last_login_1" => GetMessage("BUYER_F_DATE_AUTH"), "filter_price_all" => GetMessage("BUYER_F_PRICE_ALL"), "filter_quantity_all" => GetMessage("BUYER_F_QUANTITY_ALL"), "find_last_order_date" => GetMessage("BUYER_F_LAST_ORDER_DATE"), "filter_register_date" => GetMessage("BUYER_ROW_DATE_REGISTER"), "filter_group" => GetMessage("BUYER_F_GROUP"), "filter_currency" => GetMessage("BUYER_F_CURRENCY"), "filter_lid" => GetMessage("BUYER_ORDERS_LID")));
$oFilter->AddPreset(array("ID" => "find_best", "NAME" => GetMessage("BUYER_F_BEST"), "FIELDS" => array("filter_universal" => ""), "SORT_FIELD" => array("ORDER_SUM" => "DESC")));
$oFilter->AddPreset(array("ID" => "find_throw", "NAME" => GetMessage("BUYER_F_BUYERS_NEW"), "FIELDS" => array("filter_register_date_1_FILTER_PERIOD" => "month", "filter_register_date_1_FILTER_DIRECTION" => "current"), "SORT_FIELD" => array("DATE_REGISTER" => "DESC")));
$oFilter->Begin();
?>
<tr>
<td><?php
echo GetMessage('BUYER_ROW_BUYER');
?>
:</td>
<td>
<input type="text" name="filter_universal" value="<?php
echo htmlspecialcharsbx($filter_universal);
?>
" size="40">
</td>
</tr>
示例5: GetMessage
//"filter_delivery_request_sent" => GetMessage("SALE_F_DELIVERY_DATE_REQUEST")
$arFilterFieldsTmp[] = GetMessage("SALE_F_DELIVERY_REQUEST_SENT");
$oFilter = new CAdminFilter(
$sTableID."_filter",
$arFilterFieldsTmp
);
$oFilter->SetDefaultRows(array("filter_universal", "filter_status", "filter_canceled"));
$oFilter->AddPreset(array(
"ID" => "find_prioritet",
"NAME" => GetMessage("SOA_PRESET_PRIORITET"),
"FIELDS" => array(
"filter_status" => "N",
"filter_price_from" => "10000",
"filter_price_to" => ""
),
//"SORT_FIELD" => array("DATE_INSERT" => "DESC"),
));
$oFilter->AddPreset(array(
"ID" => "find_allow_delivery",
"NAME" => GetMessage("SOA_PRESET_ALLOW_DWLIVERY"),
"FIELDS" => array(
"filter_allow_delivery" => "Y",
"filter_canceled" => "N",
"filter_date_delivery_from_FILTER_PERIOD" => "month",
"filter_date_delivery_from_FILTER_DIRECTION" => "current",
),
//"SORT_FIELD" => array("DATE_ALLOW_DELIVERY" => "DESC"),
示例6: htmlspecialcharsbx
}
</script>
<form name="find_form" method="GET" action="<?php
echo $APPLICATION->GetCurPage();
?>
?">
<?php
$arFilterFieldsTmp = array("filter_universal" => Loc::getMessage("SOA_ROW_BUYER"), "filter_date_insert" => Loc::getMessage("SALE_F_DATE"), "filter_date_update" => Loc::getMessage("SALE_F_DATE_UPDATE"), "filter_id_from" => Loc::getMessage("SALE_F_ID"), "filter_account_number" => Loc::getMessage("SALE_F_ACCOUNT_NUMBER"), "filter_currency" => Loc::getMessage("SALE_F_LANG_CUR"), "filter_price" => Loc::getMessage("SOA_F_PRICE"), "filter_status" => Loc::getMessage("SALE_F_STATUS"), "filter_date_status_from" => Loc::getMessage("SALE_F_DATE_STATUS"), "filter_by_recommendation" => Loc::getMessage("SALE_F_BY_RECOMMENDATION"), "filter_payed" => Loc::getMessage("SALE_F_PAYED"), "filter_pay_system" => Loc::getMessage("SALE_F_PAY_SYSTEM"), "filter_person_type" => Loc::getMessage("SALE_F_PERSON_TYPE"), "filter_canceled" => Loc::getMessage("SALE_F_CANCELED"), "filter_deducted" => Loc::getMessage("SALE_F_DEDUCTED"), "filter_allow_delivery" => Loc::getMessage("SALE_F_ALLOW_DELIVERY"), "filter_date_paid" => Loc::getMessage("SALE_F_DATE_PAID"), "filter_date_allow_delivery" => Loc::getMessage("SALE_F_DATE_ALLOW_DELIVERY"), "filter_marked" => Loc::getMessage("SALE_F_MARKED"), "filter_user_id" => Loc::getMessage("SALE_F_USER_ID"), "filter_user_login" => Loc::getMessage("SALE_F_USER_LOGIN"), "filter_user_email" => Loc::getMessage("SALE_F_USER_EMAIL"), "filter_group_id" => Loc::getMessage("SALE_F_USER_GROUP_ID"), "filter_product_id" => Loc::getMessage("SO_PRODUCT_ID"), "filter_product_xml_id" => Loc::getMessage("SO_PRODUCT_XML_ID"), "filter_affiliate_id" => Loc::getMessage("SO_AFFILIATE_ID"), "filter_coupon" => Loc::getMessage("SALE_ORDER_LIST_HEADER_NAME_COUPONS"), "filter_sum_paid" => Loc::getMessage("SO_SUM_PAID"), "filter_xml_id" => Loc::getMessage("SO_XML_ID"), "filter_tracking_number" => Loc::getMessage("SOA_TRACKING_NUMBER"), "filter_source" => Loc::getMessage("SALE_F_SOURCE"));
foreach ($arOrderProps + $arOrderPropsCode as $key => $value) {
if ($value["IS_FILTERED"] == "Y" && $value["TYPE"] != "MULTIPLE") {
$arFilterFieldsTmp[] = $value["NAME"];
}
}
$oFilter = new CAdminFilter($sTableID . "_filter", $arFilterFieldsTmp);
$oFilter->SetDefaultRows(array("filter_universal", "filter_status", "filter_canceled"));
$oFilter->AddPreset(array("ID" => "find_prioritet", "NAME" => Loc::getMessage("SOA_PRESET_PRIORITET"), "FIELDS" => array("filter_status" => "N", "filter_price_from" => "10000", "filter_price_to" => "")));
$oFilter->AddPreset(array("ID" => "find_allow_payed", "NAME" => Loc::getMessage("SOA_PRESET_PAYED"), "FIELDS" => array("filter_canceled" => "N", "filter_payed" => "Y")));
$oFilter->AddPreset(array("ID" => "find_order_null", "NAME" => Loc::getMessage("SOA_PRESET_ORDER_NULL"), "FIELDS" => array("filter_canceled" => "N", "filter_payed" => "", "filter_status" => array("N", "P"), "filter_date_update_from_FILTER_PERIOD" => "before", "filter_date_update_from_FILTER_DIRECTION" => "previous", "filter_date_update_to" => ConvertTimeStamp(AddToTimeStamp(array("DD" => -7))))));
$oFilter->Begin();
?>
<tr>
<td><?php
echo Loc::getMessage('SOA_ROW_BUYER');
?>
:</td>
<td>
<input type="text" name="filter_universal" value="<?php
echo htmlspecialcharsbx($filter_universal);
?>
" size="40">
</td>