本文整理汇总了PHP中CAdminList::setNavigation方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminList::setNavigation方法的具体用法?PHP CAdminList::setNavigation怎么用?PHP CAdminList::setNavigation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminList
的用法示例。
在下文中一共展示了CAdminList::setNavigation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
$type["SORT"] = $type['BY_LANGUAGE']["en"]["SORT"];
} else {
$type["SORT"] = $type['BY_LANGUAGE'][LANGUAGE_ID]["SORT"];
}
if (empty($type['BY_LANGUAGE'][LANGUAGE_ID]["DESCRIPTION"])) {
$type["DESCRIPTION"] = $type['BY_LANGUAGE']["en"]["DESCRIPTION"];
} else {
$type["DESCRIPTION"] = $type['BY_LANGUAGE'][LANGUAGE_ID]["DESCRIPTION"];
}
$type["TEMPLATES"] = $resultMessageByTypeList[$eventName];
unset($type['BY_LANGUAGE']);
$resultList[$eventName] = $type;
}
$nav = new \Bitrix\Main\UI\AdminPageNavigation("nav-event-type");
$nav->setRecordCount(count($resultList));
$lAdmin->setNavigation($nav, Loc::getMessage("PAGES"));
$iterateNumber = 0;
foreach ($resultList as $resultItem) {
if ($iterateNumber++ >= $nav->getOffset()) {
if ($iterateNumber - $nav->getOffset() > $nav->getLimit()) {
break;
}
} else {
continue;
}
$arr = $resultItem['ID'];
$f_ID = htmlspecialcharsEx($resultItem['EVENT_NAME']);
$row =& $lAdmin->AddRow($f_ID, $resultItem, "type_edit.php?EVENT_NAME=" . $f_ID, Loc::getMessage("type_admin_edit_title"));
$row->AddViewField("ID", implode("<br />", $arr));
$row->AddViewField("LID", implode("<br />", array_intersect($arLID, $resultItem['LID'])));
$row->AddViewField("EVENT_NAME", "<a href=\"type_edit.php?EVENT_NAME=" . $f_ID . "\">" . $f_ID . "</a>");
示例2: array
}
if (in_array($find_click, array('Y', 'N'))) {
$arFilter['=IS_CLICK'] = $find_click;
}
if (in_array($find_unsub, array('Y', 'N'))) {
$arFilter['=IS_UNSUB'] = $find_unsub;
}
}
if (isset($order)) {
$order = $order == 'asc' ? 'ASC' : 'DESC';
}
$nav = new \Bitrix\Main\UI\AdminPageNavigation("nav-sender-recipient");
$recipientListDb = \Bitrix\Sender\PostingRecipientTable::getList(array('select' => array('NAME', 'EMAIL', 'CALC_IS_READ', 'CALC_IS_CLICK', 'CALC_IS_UNSUB'), 'filter' => $arFilter, 'runtime' => array(new \Bitrix\Main\Entity\ExpressionField('CALC_IS_READ', 'MAX(%s)', 'IS_READ'), new \Bitrix\Main\Entity\ExpressionField('CALC_IS_CLICK', 'MAX(%s)', 'IS_CLICK'), new \Bitrix\Main\Entity\ExpressionField('CALC_IS_UNSUB', 'MAX(%s)', 'IS_UNSUB')), 'group' => array('NAME', 'EMAIL'), 'order' => array($by => $order), 'count_total' => true, 'offset' => $nav->getOffset(), 'limit' => $nav->getLimit()));
$aContext = array();
$nav->setRecordCount($recipientListDb->getCount());
$lAdmin->setNavigation($nav, \Bitrix\Main\Localization\Loc::getMessage("rub_nav"));
$lAdmin->AddHeaders(array(array("id" => "EMAIL", "content" => GetMessage("rub_email"), "sort" => "EMAIL", "default" => true), array("id" => "NAME", "content" => GetMessage("rub_name"), "sort" => "NAME", "default" => true), array("id" => "IS_READ", "content" => GetMessage("rub_f_read"), "sort" => "IS_READ", "default" => true), array("id" => "IS_CLICK", "content" => GetMessage("rub_f_click"), "sort" => "IS_CLICK", "default" => true), array("id" => "IS_UNSUB", "content" => GetMessage("rub_f_unsub"), "sort" => "IS_UNSUB", "default" => true)));
while ($resultRow = $recipientListDb->fetch()) {
$row =& $lAdmin->AddRow(false, $resultRow);
$row->AddViewField("NAME", htmlspecialcharsbx($resultRow['NAME']));
$row->AddViewField("EMAIL", htmlspecialcharsbx($resultRow['EMAIL']));
$row->AddViewField("IS_READ", $resultRow['CALC_IS_READ'] == 'Y' ? GetMessage("POST_U_YES") : GetMessage("POST_U_NO"));
$row->AddViewField("IS_CLICK", $resultRow['CALC_IS_CLICK'] == 'Y' ? GetMessage("POST_U_YES") : GetMessage("POST_U_NO"));
$row->AddViewField("IS_UNSUB", $resultRow['CALC_IS_UNSUB'] == 'Y' ? GetMessage("POST_U_YES") : GetMessage("POST_U_NO"));
}
$lAdmin->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $recipientListDb->getCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
$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($MAILING_ID > 0 ? GetMessage("rub_f_mailing_chain") : null, GetMessage("rub_f_email"), GetMessage("rub_f_name"), GetMessage("rub_f_sent"), GetMessage("rub_f_read"), GetMessage("rub_f_click"), GetMessage("rub_f_unsub")));
示例3: array
case "mark_as_unread":
CMailMessage::Update($ID, array("NEW_MESSAGE" => "Y"));
break;
case "delete":
CMailMessage::Delete($ID);
break;
case "refilter":
CMailFilter::FilterMessage($ID, "M", $filter_id);
break;
}
}
}
$nav = new Bitrix\Main\UI\AdminPageNavigation('nav-mail-message');
$messageList = Bitrix\Mail\MailMessageTable::getList(array('select' => array('ID', 'MAILBOX_ID', 'MAILBOX_NAME' => 'MAILBOX.NAME', 'NEW_MESSAGE', 'SUBJECT', 'MESSAGE_SIZE', 'SPAM', 'SPAM_RATING', 'FIELD_FROM', 'FIELD_REPLY_TO', 'FIELD_CC', 'FIELD_BCC', 'FIELD_DATE', 'DATE_INSERT', 'ATTACHMENTS', 'MSG_ID'), 'filter' => array_filter($arFilter), 'order' => array(strtoupper($by) => $order), 'offset' => $nav->getOffset(), 'limit' => $nav->getLimit(), 'count_total' => true));
$nav->setRecordCount($messageList->getCount());
$lAdmin->setNavigation($nav, Bitrix\Main\Localization\Loc::getMessage("MAIL_MSG_ADM_NAVIGATION"));
$arHeaders = array();
$arHeaders[] = array("id" => "SUBJECT", "content" => GetMessage("MAIL_MSG_ADM_SUBJECT"), "default" => true, "sort" => "subject");
$arHeaders[] = array("id" => "FIELD_FROM", "content" => GetMessage("MAIL_MSG_ADM_FROM"), "default" => true, "sort" => "field_from");
$arHeaders[] = array("id" => "FIELD_REPLY_TO", "content" => GetMessage("MAIL_MSG_ADM_REPLY_TO"), "sort" => "field_reply_to");
$arHeaders[] = array("id" => "FIELD_CC", "content" => GetMessage("MAIL_MSG_ADM_CC"), "sort" => "field_cc");
$arHeaders[] = array("id" => "FIELD_BCC", "content" => GetMessage("MAIL_MSG_ADM_BCC"), "sort" => "field_bcc");
$arHeaders[] = array("id" => "FIELD_DATE", "content" => GetMessage("MAIL_MSG_ADM_DATE"), "default" => true, "sort" => "field_date");
$arHeaders[] = array("id" => "DATE_INSERT", "content" => GetMessage("MAIL_MSG_ADM_RECEIVED"), "sort" => "date_insert");
$arHeaders[] = array("id" => "MAILBOX_NAME", "content" => GetMessage("MAIL_MSG_ADM_MBOX"), "default" => true, "sort" => "mailbox_name");
$arHeaders[] = array("id" => "MESSAGE_SIZE", "content" => GetMessage("MAIL_MSG_ADM_SIZE"), "default" => true, "sort" => "size", "align" => "right");
$arHeaders[] = array("id" => "SPAM_RATING", "content" => GetMessage("MAIL_MSG_ADM_SPAM") . "<br>" . GetMessage("MAIL_MSG_ADM_SPAM_R"), "default" => true, "sort" => "size");
$arHeaders[] = array("id" => "ATTACHMENTS", "content" => GetMessage("MAIL_MSG_ADM_SPAM_ATTCH"), "default" => true, "sort" => "attachments");
$arHeaders[] = array("id" => "ID", "content" => "ID", "sort" => "id");
$arHeaders[] = array("id" => "MSG_ID", "content" => "Message-ID");
$lAdmin->AddHeaders($arHeaders);
示例4: implode
if (!$result->isSuccess()) {
$adminList->AddGroupError("(ID=" . $ID . ") " . implode("<br>", $result->getErrorMessages()), $ID);
}
break;
}
}
}
$APPLICATION->SetTitle(Loc::getMessage("TITLE"));
/**
* @global $by
* @global $order
*/
$nav = new \Bitrix\Main\UI\AdminPageNavigation("nav-culture");
$cultureList = CultureTable::getList(array('order' => array(strtoupper($by) => $order), 'count_total' => true, 'offset' => $nav->getOffset(), 'limit' => $nav->getLimit()));
$nav->setRecordCount($cultureList->getCount());
$adminList->setNavigation($nav, Loc::getMessage("PAGES"));
$adminList->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "ID", "default" => true), array("id" => "NAME", "content" => Loc::getMessage("NAME"), "sort" => "NAME", "default" => true), array("id" => "CODE", "content" => Loc::getMessage("culture_code"), "sort" => "CODE", "default" => true), array("id" => "FORMAT_DATE", "content" => Loc::getMessage("culture_date"), "sort" => "FORMAT_DATE", "default" => true), array("id" => "FORMAT_DATETIME", "content" => Loc::getMessage("culture_datetime"), "sort" => "FORMAT_DATETIME", "default" => true), array("id" => "FORMAT_NAME", "content" => Loc::getMessage("culture_name"), "sort" => "FORMAT_NAME", "default" => true), array("id" => "CHARSET", "content" => Loc::getMessage("culture_charset"), "sort" => "CHARSET", "default" => true), array("id" => "WEEK_START", "content" => Loc::getMessage("culture_week"), "sort" => "WEEK_START", "default" => false), array("id" => "DIRECTION", "content" => Loc::getMessage("culture_direction"), "sort" => "DIRECTION", "default" => false)));
$days = array(Loc::getMessage("culture_su"), Loc::getMessage("culture_mo"), Loc::getMessage("culture_tu"), Loc::getMessage("culture_we"), Loc::getMessage("culture_th"), Loc::getMessage("culture_fr"), Loc::getMessage("culture_sa"));
while ($culture = $cultureList->fetch()) {
$id = htmlspecialcharsbx($culture["ID"]);
$name = htmlspecialcharsbx($culture["NAME"]);
$row =& $adminList->AddRow($id, $culture, "culture_edit.php?ID=" . $id . "&lang=" . LANGUAGE_ID, Loc::getMessage("LANG_EDIT_TITLE"));
$row->AddViewField("ID", $id);
$row->AddField("NAME", '<a href="culture_edit.php?ID=' . $id . '&lang=' . LANGUAGE_ID . '" title="' . Loc::getMessage("LANG_EDIT_TITLE") . '">' . $name . '</a>', $name);
$row->AddInputField("CODE");
$row->AddInputField("FORMAT_DATE");
$row->AddInputField("FORMAT_DATETIME");
$row->AddInputField("FORMAT_NAME");
$row->AddViewField("WEEK_START", $days[$culture["WEEK_START"]]);
$row->AddInputField("CHARSET");
$row->AddViewField("DIRECTION", $culture["DIRECTION"] == CultureTable::LEFT_TO_RIGHT ? Loc::getMessage("culture_left_to_right") : Loc::getMessage("culture_right_to_left"));