本文整理汇总了PHP中CAdminList::AddAdminContextMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminList::AddAdminContextMenu方法的具体用法?PHP CAdminList::AddAdminContextMenu怎么用?PHP CAdminList::AddAdminContextMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminList
的用法示例。
在下文中一共展示了CAdminList::AddAdminContextMenu方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetMessage
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);
$arActions = array();
$arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("FM_ACT_DELETE"), "ACTION" => "if(confirm('" . GetMessage("FM_ACT_DEL_CONFIRM") . "')) " . $lAdmin->ActionDoGroup($t_ID, "delete", "USER_ID=" . $USER_ID . "&lang=" . LANG));
$row->AddActions($arActions);
}
//************************************ Footer *********************************************************************
$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('FM_ACT_DELETE')));
$aMenu = array(array("TEXT" => GetMessage("FM_LIST_USER"), "LINK" => "/bitrix/admin/forum_subscribe.php?lang=" . LANG, "ICON" => "btn_list"));
$lAdmin->AddAdminContextMenu($aMenu);
$lAdmin->CheckListMode();
//************************************ Page ***********************************************************************
$APPLICATION->SetTitle(GetMessage("FM_TITLE") . $LOGIN);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$oFilter = new CAdminFilter($sTableID . "_subscribe", array(GetMessage("FM_FLT_START_DATE_ALT"), GetMessage("FM_FLT_SUBSCR_TYPE_ALT")));
?>
<form name="form1" method="get" action="<?php
echo $APPLICATION->GetCurPage();
?>
?">
<input type="hidden" name="USER_ID" value="<?php
echo $USER_ID;
?>
">
<?php
示例2: array
$row->AddEditField("LID", CLang::SelectBox("FIELDS[" . $arRes["ID"] . "][LID]", $arRes["LID"]));
$row->AddInputField("SORT", array("size" => 20));
$row->AddCheckField("ACTIVE");
$row->AddViewField("ID", '<a href="xdi_lf_scheme_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $arRes["ID"] . '">' . $arRes["ID"] . '</a>');
$row->AddViewField("TYPE", GetMessage("LFP_SCHEME_LIST_" . $arRes["TYPE"]));
$arActions = array(array("ICON" => "edit", "DEFAULT" => true, "TEXT" => GetMessage("LFP_SCHEME_LIST_EDIT"), "ACTION" => $lAdmin->ActionRedirect('xdi_lf_scheme_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $arRes["ID"])));
$arActions[] = array("SEPARATOR" => "Y");
if ($arRes["ACTIVE"] === "Y") {
$arActions[] = array("TEXT" => GetMessage("LFP_SCHEME_LIST_DEACTIVATE"), "ACTION" => "if(confirm('" . GetMessage("LFP_SCHEME_LIST_DEACTIVATE_CONF") . "')) " . $lAdmin->ActionDoGroup($arRes["ID"], "deactivate"));
} else {
$arActions[] = array("TEXT" => GetMessage("LFP_SCHEME_LIST_ACTIVATE"), "ACTION" => $lAdmin->ActionDoGroup($arRes["ID"], "activate"));
}
$arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("LFP_SCHEME_LIST_DELETE"), "ACTION" => "if(confirm('" . GetMessage("LFP_SCHEME_LIST_DELETE_CONF") . "')) " . $lAdmin->ActionDoGroup($arRes["ID"], "delete"));
if (!empty($arActions)) {
$row->AddActions($arActions);
}
}
$arFooter = array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $rsData->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => 0));
$lAdmin->AddFooter($arFooter);
$lAdmin->AddGroupActionTable(array("delete" => GetMessage("MAIN_ADMIN_LIST_DELETE"), "activate" => GetMessage("MAIN_ADMIN_LIST_ACTIVATE"), "deactivate" => GetMessage("MAIN_ADMIN_LIST_DEACTIVATE")));
$aAdd = array(array("TEXT" => GetMessage("LFP_SCHEME_LIST_POST"), "TITLE" => GetMessage("LFP_SCHEME_LIST_POST"), "ACTION" => "window.location='" . addslashes("/bitrix/admin/xdi_lf_scheme_edit.php") . "?lang=" . LANGUAGE_ID . "&TYPE=POST';"), array("TEXT" => GetMessage("LFP_SCHEME_LIST_RSS"), "TITLE" => GetMessage("LFP_SCHEME_LIST_RSS"), "ACTION" => "window.location='" . addslashes("/bitrix/admin/xdi_lf_scheme_edit.php") . "?lang=" . LANGUAGE_ID . "&TYPE=RSS';"));
if (IsModuleInstalled("webservice")) {
$aAdd[] = array("TEXT" => GetMessage("LFP_SCHEME_LIST_XML"), "TITLE" => GetMessage("LFP_SCHEME_LIST_XML"), "ACTION" => "window.location='" . addslashes("/bitrix/admin/xdi_lf_scheme_edit.php") . "?lang=" . LANGUAGE_ID . "&TYPE=XML';");
}
$aContext = array(array("TEXT" => GetMessage("LFP_SCHEME_LIST_ADD"), "TITLE" => GetMessage("LFP_SCHEME_LIST_ADD_TITLE"), "ICON" => "btn_new", "MENU" => $aAdd));
$lAdmin->AddAdminContextMenu($aContext, false);
$lAdmin->CheckListMode();
$APPLICATION->SetTitle(GetMessage("LFP_SCHEME_LIST_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$lAdmin->DisplayList();
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
示例3: array
);
$adminList->AddGroupActionTable(
array(
'delete' => Loc::getMessage('MAIN_ADMIN_LIST_DELETE'),
'activate' => Loc::getMessage('MAIN_ADMIN_LIST_ACTIVATE'),
'deactivate' => Loc::getMessage('MAIN_ADMIN_LIST_DEACTIVATE'),
)
);
$contextMenu = array();
if (!$readOnly)
{
$contextMenu[] = array(
'ICON' => 'btn_new',
'TEXT' => Loc::getMessage('BT_SALE_DISCOUNT_COUPONT_LIST_MESS_NEW_COUPON'),
'TITLE' => Loc::getMessage('BT_SALE_DISCOUNT_COUPON_LIST_MESS_NEW_COUPON_TITLE'),
'LINK' => 'sale_discount_coupon_edit.php?lang='.LANGUAGE_ID.GetFilterParams('filter_'),
);
}
if (!empty($contextMenu))
$adminList->AddAdminContextMenu($contextMenu);
$adminList->CheckListMode();
$APPLICATION->SetTitle(Loc::getMessage('BT_SALE_DISCOUNT_COUPON_LIST_TITLE'));
require($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_admin_after.php');
$adminList->DisplayList();
require($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/epilog_admin.php');
示例4: updateCampaign
}
}
if ($campaign['SETTINGS']['StatusModerate'] == Engine\YandexDirect::STATUS_NEW) {
$actionsList[] = array("ICON" => "delete", "TEXT" => Loc::getMessage("SEO_CAMPAIGN_DELETE"), "ACTION" => "if(confirm('" . \CUtil::JSEscape(Loc::getMessage('SEO_CAMPAIGN_DELETE_CONFIRM')) . "')) " . $adminList->ActionDoGroup($campaign['ID'], "delete", $archive ? "archive=1" : ""));
}
$row->AddActions($actionsList);
}
}
if ($archive) {
$aContext = array(array("ICON" => "btn_list", "TEXT" => GetMessage("SEO_CAMPAIGN_LIST_ACTIVE"), "LINK" => "seo_search_yandex_direct.php?lang=" . LANGUAGE_ID, "TITLE" => GetMessage("SEO_LIST_CAMPAIGN_ACTIVE_TITLE")));
} elseif ($bNeedAuth) {
$aContext = array(array("ICON" => "btn_archive", "TEXT" => GetMessage("SEO_LIST_INACTIVE"), "LINK" => "seo_search_yandex_direct.php?lang=" . LANGUAGE_ID . "&archive=1", "TITLE" => GetMessage("SEO_LIST_CAMPAIGN_INACTIVE_TITLE")));
} else {
$aContext = array(array("ICON" => "btn_new", "TEXT" => GetMessage("MAIN_ADD"), "LINK" => "seo_search_yandex_direct_edit.php?lang=" . LANGUAGE_ID, "TITLE" => GetMessage("MAIN_ADD")), array("ICON" => "btn_update", "TEXT" => GetMessage("SEO_CAMPAIGN_LIST_UPDATE_LIST"), "ONCLICK" => "updateCampaign(this)", "TITLE" => GetMessage("SEO_CAMPAIGN_LIST_UPDATE_TITLE")), array("ICON" => "btn_archive", "TEXT" => GetMessage("SEO_LIST_INACTIVE"), "LINK" => "seo_search_yandex_direct.php?lang=" . LANGUAGE_ID . "&archive=1", "TITLE" => GetMessage("SEO_LIST_CAMPAIGN_INACTIVE_TITLE")));
}
$adminList->AddAdminContextMenu($aContext);
$adminList->CheckListMode();
$APPLICATION->SetTitle($archive ? Loc::getMessage("SEO_YANDEX_DIRECT_TITLE_ARCHIVE") : Loc::getMessage("SEO_YANDEX_DIRECT_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
?>
<script type="text/javascript">
function updateCampaign(btn, campaignId)
{
if(btn.type == 'button')
{
if (!btn.name)
{
btn.name = 'template_preview';
}
BX.adminPanel.showWait(btn);
示例5: switch
switch ($col['id']) {
case 'AUTHOR_ID':
if ($res['AUTHOR_ID'] && ($user = CUser::GetByID($res['AUTHOR_ID'])->Fetch())) {
$row->AddViewField($col['id'], '[<a href="user_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $res['AUTHOR_ID'] . '" target="_blank">' . $user['ID'] . '</a>] (' . htmlspecialcharsEx($user['LOGIN']) . ') ' . htmlspecialcharsEx($user['NAME'] . ' ' . $user['LAST_NAME']));
} else {
$row->AddViewField($col['id'], $res[$col['id']] . $res['AUTHOR_ID']);
}
break;
case 'POST_MESSAGE':
$input = '<div style="width:400px;"><label for="' . $res['ID'] . '_edit">Отзыв</label><br>';
$input .= '<textarea rows="10" cols="50" name="FIELDS[' . $res['ID'] . '][POST_MESSAGE]" id="' . $res['ID'] . '_edit">' . htmlspecialcharsex($res['POST_MESSAGE']) . '</textarea></div>';
$row->AddEditField('POST_MESSAGE', $input);
break;
default:
$row->AddViewField($col['id'], $res[$col['id']]);
}
}
$actions = [['DEFAULT' => 'Y', 'ICON' => 'edit', 'TEXT' => 'Редактировать', 'ACTION' => $lAdmin->ActionRedirect($APPLICATION->GetCurPageParam(bitrix_sessid_get() . '&ID[]=' . $f_ID . '&action_button=edit', ['sessid', 'ID', 'action_button']))], ['ICON' => 'delete', 'TEXT' => 'Удалить', 'ACTION' => 'if(confirm(\'Вы действительно хотите удалить отзыв?\')) window.location=\'' . $APPLICATION->GetCurPage() . '?lang=' . LANGUAGE_ID . '&action=delete&ID=' . $f_ID . '&' . bitrix_sessid_get() . '\';']];
$row->AddActions($actions);
}
$lAdmin->AddFooter([['title' => Loc::getMessage('MAIN_ADMIN_LIST_SELECTED'), 'value' => $adminResult->SelectedRowsCount()], ['counter' => true, 'title' => Loc::getMessage('MAIN_ADMIN_LIST_CHECKED'), 'value' => '0']]);
$chain = $lAdmin->CreateChain();
$chain->AddItem(['TEXT' => 'Отзывы на сайте', 'LINK' => $APPLICATION->GetCurPageParam('', [], true)]);
$lAdmin->ShowChain($chain);
$lAdmin->AddGroupActionTable(['delete' => 'Удалить отзывы']);
$lAdmin->AddAdminContextMenu([], false, false);
$lAdmin->CheckListMode();
$APPLICATION->SetTitle('Отзывы на сайте');
require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_admin_after.php';
$lAdmin->DisplayList();
require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/epilog_admin.php';
示例6: array
} else {
$row->AddField("STATE", "Link");
}
$row->AddSelectField("APPROVED", array("Y" => GetMessage("F_SHOW"), "N" => GetMessage("F_HIDE")));
$row->AddSelectField("SORT", array("100" => GetMessage("F_PINN"), "150" => GetMessage("F_UNPINN")));
$row->AddInputField("USER_START_NAME", array("size" => "20"));
$row->AddInputField("START_DATE", array("size" => "16"));
$row->AddField("POSTS", $t_POSTS);
$row->AddInputField("VIEWS", array("size" => "2"));
$row->AddSelectField("FORUM_ID", $arrForum);
$row->AddInputField("LAST_POST_DATE", array("size" => "16"));
}
/*******************************************************************/
$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("FM_ACT_DELETE"), "move" => GetMessage("FM_ACT_MOVE"), "space" => array("type" => "html", "value" => " "), "move_to" => array("type" => "html", "value" => "<select name=\"move_to\" id=\"move_to\" disabled>" . $arrSelect . "</select>" . "<input type=\"hidden\" name=\"copy_to_site\" value=\"\">")), array("select_onchange" => "this.form.move_to.disabled=this.form.action.value=='move'? false : true;"));
$lAdmin->AddAdminContextMenu();
/*******************************************************************/
$lAdmin->CheckListMode();
/*******************************************************************/
$APPLICATION->SetTitle(GetMessage("FORUM_TOPICS"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$oFilter = new CAdminFilter($sTableID . "_filter", array(GetMessage("FM_TITLE_NAME"), GetMessage("FM_TITLE_DESCRIPTION"), GetMessage("FM_TITLE_APPROVED"), GetMessage("FM_TITLE_SORT"), GetMessage("FM_TITLE_STATE"), GetMessage("FM_TITLE_DATE_CREATE"), GetMessage("FM_TITLE_DATE_LAST_POST"), GetMessage("FM_TITLE_USER_START_ID")));
?>
<form name="form1" method="get" action="<?php
echo $APPLICATION->GetCurPage();
?>
?">
<?php
$oFilter->Begin();
?>
<tr valign="center">
示例7: intval
$logoHtml = intval($f_LOGOTIP) > 0 ? CFile::ShowImage(CFile::GetFileArray($f_LOGOTIP), 150, 150, "border=0", "", false) : "";
$row->AddField("LOGOTIP", $logoHtml);
$row->AddField("ACTIVE", $f_ACTIVE == "Y" ? Loc::getMessage("SALE_DSE_YES") : Loc::getMessage("SALE_DSE_NO"));
$row->AddField("CLASS_NAME", $f_CLASS_NAME);
$arActions = array();
$arActions[] = array("ICON" => "edit", "TEXT" => Loc::getMessage("SALE_DSE_COPY"), "ACTION" => $lAdminSubServices->ActionRedirect("sale_delivery_service_edit.php?lang=" . LANG . "&ID=" . $f_ID . "&action=copy&back_url=" . urlencode($APPLICATION->GetCurPageParam())), "DEFAULT" => true);
$arActions[] = array("ICON" => "edit", "TEXT" => Loc::getMessage("SALE_DSE_EDIT_DESCR"), "ACTION" => $lAdminSubServices->ActionRedirect("sale_delivery_service_edit.php?lang=" . LANG . "&PARENT_ID=" . $f_PARENT_ID . "&ID=" . $f_ID . "&back_url=" . urlencode($APPLICATION->GetCurPageParam())), "DEFAULT" => true);
if ($saleModulePermissions >= "W") {
$arActions[] = array("SEPARATOR" => true);
$arActions[] = array("ICON" => "delete", "TEXT" => Loc::getMessage("SALE_DSE_DELETE"), "ACTION" => "if(confirm('" . Loc::getMessage('SALE_DSE_CONFIRM_DEL_PROFILE_MESSAGE') . "')) " . $lAdminSubServices->ActionRedirect("sale_delivery_service_edit.php?lang=" . LANG . "&PARENT_ID=" . $fields["PARENT_ID"] . "&ID=" . $ID . "&action=profile_delete&ID_PROF=" . $f_ID));
}
$row->AddActions($arActions);
}
if ($saleModulePermissions == "W") {
$aContext = array(array("TEXT" => Loc::getMessage("SALE_DSE_ADD_NEW_PROFILE"), "LINK" => "sale_delivery_service_edit.php?lang=" . LANG . "&PARENT_ID=" . $ID . "&back_url=" . urlencode($APPLICATION->GetCurPageParam()), "TITLE" => Loc::getMessage("SALE_DSE_ADD_NEW_PROFILE_TITLE"), "ICON" => "btn_new"));
$lAdminSubServices->AddAdminContextMenu($aContext, false);
}
if ($_REQUEST["table_id"] == $sTableIDSubService) {
$lAdminSubServices->CheckListMode();
}
}
/* profiles end */
Asset::getInstance()->addJs("/bitrix/js/sale/delivery.js");
if ($parentService && get_class($parentService) != 'Bitrix\\Sale\\Delivery\\Services\\Group') {
if ($ID > 0) {
$sDocTitle = str_replace(array("#NAME#", "#PARENT_NAME#"), array($fields["NAME"], $parentService->getName()), Loc::getMessage("SALE_DSE_EDIT_RECORD_PROFILE"));
} else {
$sDocTitle = str_replace("#PARENT_NAME#", $parentService->getName(), Loc::getMessage("SALE_DSE_NEW_RECORD_PROFILE"));
}
} else {
if ($isGroup) {
示例8: array
}
$arActions = array();
$arActions[] = array("ICON" => "edit", "TEXT" => GetMessage("BPATL_VIEW"), "ACTION" => $lAdmin->ActionRedirect('bizproc_task.php?id=' . $f_ID . $s . '&back_url=' . urlencode($APPLICATION->GetCurPageParam("lang=" . LANGUAGE_ID, array("lang"))) . ''), "DEFAULT" => true);
$row->AddActions($arActions);
}
$lAdmin->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $dbResultList->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
if ($allowAdminAccess && isset($arFilter['USER_STATUS']) && $arFilter['USER_STATUS'] == 0) {
$lAdmin->AddGroupActionTable(array('set_status_' . CBPTaskUserStatus::Yes => GetMessage("BPATL_GROUP_ACTION_YES"), 'set_status_' . CBPTaskUserStatus::No => GetMessage("BPATL_GROUP_ACTION_NO"), 'set_status_' . CBPTaskUserStatus::Ok => GetMessage("BPATL_GROUP_ACTION_OK"), 'delegate' => GetMessage('BPATL_GROUP_ACTION_DELEGATE'), 'delegate_dialog' => array('type' => 'html', 'value' => '<div id="action_delegate_to" style="display:none">
<input type="text" name="delegate_to" size="3" name=""/>
<input type="button" OnClick="window.open(\'/bitrix/admin/user_search.php?lang=' . LANGUAGE_ID . '&FN=form_' . $sTableID . '&FC=delegate_to\',
\'\', \'scrollbars=yes,resizable=yes,width=760,height=500,top=\'+Math.floor((screen.height - 560)/2-14)
+\',left=\'+Math.floor((screen.width - 760)/2-5));" value=" ... "></div>')), array('select_onchange' => 'BX("action_delegate_to").style.display = (this.value == "delegate"? "block":"none");', 'disable_action_target' => true));
}
if ($bizprocModulePermissions >= "W") {
$aContext = array();
$lAdmin->AddAdminContextMenu($aContext);
}
$lAdmin->AddAdminContextMenu(array(), false);
$lAdmin->CheckListMode();
/****************************************************************************/
/*********** MAIN PAGE ****************************************************/
/****************************************************************************/
$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
示例9: urlencode
$arActions[] = array("ICON" => "list", "TEXT" => GetMessage("IBLOCK_ADM_MENU_PROPERTIES"), "ACTION" => $adminList->ActionRedirect("iblock_property_admin.php?IBLOCK_ID=" . $f_ID . "&lang=" . LANGUAGE_ID . ($_REQUEST["admin"] == "Y" ? "&admin=Y" : "&admin=N")));
}
if ($bBizproc && $dbrs["BIZPROC"] == "Y" && CIBlockRights::UserHasRightTo($f_ID, $f_ID, "iblock_edit") && IsModuleInstalled("bizprocdesigner")) {
$arActions[] = array("ICON" => "", "TEXT" => GetMessage("IBLOCK_ADM_MENU_BIZPROC"), "ACTION" => "window.location='/bitrix/admin/iblock_bizproc_workflow_admin.php?document_type=iblock_" . $f_ID . "&lang=" . LANGUAGE_ID . "';");
}
if ($_REQUEST["admin"] == "Y" && CIBlockRights::UserHasRightTo($f_ID, $f_ID, "iblock_delete")) {
$arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("MAIN_ADMIN_MENU_DELETE"), "ACTION" => "if(confirm('" . GetMessageJS("IBLOCK_ADM_CONFIRM_DEL_MESSAGE") . "')) " . $adminList->ActionDoGroup($f_ID, "delete", "&type=" . htmlspecialcharsbx($type) . "&lang=" . LANGUAGE_ID . "&admin=" . ($_REQUEST["admin"] == "Y" ? "Y" : "N")));
}
if (count($arActions)) {
$row->AddActions($arActions);
}
}
$adminList->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $rsIBlocks->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
if ($USER->IsAdmin() && $_REQUEST["admin"] == "Y") {
$aContext = array(array("ICON" => "btn_new", "TEXT" => GetMessage("IBLOCK_ADM_TO_ADDIBLOCK"), "LINK" => "iblock_edit.php?lang=" . LANGUAGE_ID . "&admin=Y&type=" . urlencode($type), "TITLE" => GetMessage("IBLOCK_ADM_TO_ADDIBLOCK_TITLE")));
$adminList->AddAdminContextMenu($aContext);
$adminList->AddGroupActionTable(array("delete" => GetMessage("MAIN_ADMIN_LIST_DELETE"), "activate" => GetMessage("MAIN_ADMIN_LIST_ACTIVATE"), "deactivate" => GetMessage("MAIN_ADMIN_LIST_DEACTIVATE")));
} else {
$adminList->AddAdminContextMenu(array());
}
$adminList->CheckListMode();
$APPLICATION->SetTitle(GetMessage("IBLOCK_ADM_TITLE", array("#IBLOCK_TYPE#" => $arIBTYPE["~NAME"])));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
?>
<form method="GET" action="iblock_admin.php?type=<?php
echo urlencode($type);
?>
" name="find_form">
<input type="hidden" name="admin" value="<?php
echo $_REQUEST["admin"] == "Y" ? "Y" : "N";
?>
示例10: array
$arRowActions[] = array("ICON" => "copy", "TEXT" => GetMessage('SALE_REPORT_LIST_ROW_ACTIONS_COPY_TEXT'), "ACTION" => $lReports->ActionRedirect("sale_report_construct.php?copyID=" . $arRes['ID'] . "&lang=" . LANG));
if ($markNum === 0) {
$arRowActions[] = array("ICON" => "edit", "TEXT" => GetMessage('SALE_REPORT_LIST_ROW_ACTIONS_EDIT_TEXT'), "ACTION" => $lReports->ActionRedirect("sale_report_construct.php?ID=" . $arRes['ID'] . "&lang=" . LANG));
}
$arRowActions[] = array("ICON" => "delete", "TEXT" => GetMessage('SALE_REPORT_LIST_ROW_ACTIONS_DELETE_TEXT'), "ACTION" => "if(confirm('" . GetMessage("REPORT_DELETE_CONFIRM") . "')) " . $lReports->ActionDoGroup($arRes['ID'], "delete"));
}
// </editor-fold>
$lRow->AddActions($arRowActions);
$nReports++;
}
// Group actions
$lReports->AddGroupActionTable(array("delete" => GetMessage("MAIN_ADMIN_LIST_DELETE")));
// Menu of actions.
$arContextMenu = array(array("TEXT" => GetMessage("SALE_REPORT_LIST_ADD_REPORT"), "LINK" => "sale_report_construct.php?lang=" . LANG, "TITLE" => GetMessage("SALE_REPORT_LIST_ADD_REPORT_TITLE"), "ICON" => "btn_new"));
// Attach "Menu of actions".
$lReports->AddAdminContextMenu($arContextMenu);
// Adding summary row.
$lReports->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $dbRepList->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
// Processing options or export to Excel.
$lReports->CheckListMode();
}
// </editor-fold>
// Page header
$APPLICATION->SetTitle(GetMessage("SALE_REPORT_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
// <editor-fold defaultstate="collapsed" desc="--------- Page output ---------">
if ($errorMessage) {
$errAdmMessage = new CAdminMessage(array("DETAILS" => $errorMessage, "TYPE" => "ERROR", "MESSAGE" => GetMessage('SALE_REPORT_ERROR_GETREPORTLIST'), "HTML" => true));
echo $errAdmMessage->Show();
} else {
?>
示例11: catch
if ($user["ID"] > 0) {
$cache_users[$arr_order["USER_ID"]] = $user["NAME"] . " " . $user["LAST_NAME"];
$arr_order["USER_ID"] = $cache_users[$arr_order["USER_ID"]];
}
} else {
$arr_order["USER_ID"] = $cache_users[$arr_order["USER_ID"]];
}
$row =& $o_table->AddRow($var_ID, $arr_order);
$name = Loc::getMessage("DEVTM_BEGATEWAY_ORDER_TITLE") . $arr_order["ID"];
$row->AddViewField("ID", "<a href=\"begateway_transaction_payment.php?ID=" . $var_ID . "&lang=" . LANG . "\" >" . $name . "</a>");
/*$action = array(
array(
"ICON" => "edit",
"DEFAULT" => true,
"TEXT" => Loc::getMessage("DEVTM_BEGATEWAY_CONTEXT_MENU_MESSAGE"),
"ACTION" => $o_table->ActionRedirect("begateway_transaction_payment.php?ID=".$var_ID."&lang=".LANG)
),
);
$row->AddActions($action);*/
}
$o_table->AddAdminContextMenu();
$o_table->CheckListMode();
$APPLICATION->SetTitle(Loc::getMessage("DEVTM_BEGATEWAY_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$o_table->DisplayList();
} catch (Exception $e) {
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
CAdminMessage::ShowMessage(array("MESSAGE" => $e->getMessage(), "TYPE" => "ERROR"));
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
示例12: GetMessage
}
}
$lAdmin->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $rsData->SelectedRowsCount())));
if ($group == "none") {
$group_title = GetMessage("PERFMON_CACHE_GROUP_NONE");
} elseif ($group == "comp") {
$group_title = GetMessage("PERFMON_CACHE_GROUP_COMP");
} elseif ($group == "type") {
$group_title = GetMessage("PERFMON_CACHE_GROUP_BASE_DIR");
} elseif ($group == "dir") {
$group_title = GetMessage("PERFMON_CACHE_GROUP_INIT_DIR");
} elseif ($group == "file") {
$group_title = GetMessage("PERFMON_CACHE_GROUP_FILE_NAME");
}
$aContext = array(array("TEXT" => $group_title, "MENU" => array(array("TEXT" => GetMessage("PERFMON_CACHE_GROUP_NONE"), "ACTION" => $lAdmin->ActionRedirect("perfmon_cache_list.php?lang=" . LANGUAGE_ID . "&group=none"), "ICON" => $group == "none" ? "checked" : ""), array("TEXT" => GetMessage("PERFMON_CACHE_GROUP_COMP"), "ACTION" => $lAdmin->ActionRedirect("perfmon_cache_list.php?lang=" . LANGUAGE_ID . "&group=comp"), "ICON" => $group == "comp" ? "checked" : ""), array("TEXT" => GetMessage("PERFMON_CACHE_GROUP_BASE_DIR"), "ACTION" => $lAdmin->ActionRedirect("perfmon_cache_list.php?lang=" . LANGUAGE_ID . "&group=type"), "ICON" => $group == "type" ? "checked" : ""), array("TEXT" => GetMessage("PERFMON_CACHE_GROUP_INIT_DIR"), "ACTION" => $lAdmin->ActionRedirect("perfmon_cache_list.php?lang=" . LANGUAGE_ID . "&group=dir"), "ICON" => $group == "dir" ? "checked" : ""), array("TEXT" => GetMessage("PERFMON_CACHE_GROUP_FILE_NAME"), "ACTION" => $lAdmin->ActionRedirect("perfmon_cache_list.php?lang=" . LANGUAGE_ID . "&group=file"), "ICON" => $group == "file" ? "checked" : ""))));
$lAdmin->AddAdminContextMenu($aContext, false, $group === "none");
$lAdmin->CheckListMode();
$APPLICATION->SetTitle(GetMessage("PERFMON_CACHE_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
if ($group == "none") {
$oFilter = new CAdminFilter($sTableID . "_filter", array("find_component_name" => GetMessage("PERFMON_CACHE_COMPONENT_NAME"), "find_module_name" => GetMessage("PERFMON_CACHE_MODULE_NAME"), "find_hit_id" => GetMessage("PERFMON_CACHE_HIT_ID"), "find_component_id" => GetMessage("PERFMON_CACHE_COMPONENT_ID"), "find_op_mode" => GetMessage("PERFMON_CACHE_OP_MODE"), "find_base_dir" => GetMessage("PERFMON_CACHE_BASE_DIR"), "find_init_dir" => GetMessage("PERFMON_CACHE_INIT_DIR"), "find_file_name" => GetMessage("PERFMON_CACHE_FILE_NAME")));
?>
<form name="find_form" method="get" action="<?php
echo $APPLICATION->GetCurPage();
?>
">
<?php
$oFilter->Begin();
?>
<tr>
示例13: buildList
//.........这里部分代码省略.........
$visibleColumns = array_values($visibleColumns);
$visibleColumns = array_merge($visibleColumns, array_keys($this->tableColumnsMap));
}
$className = static::getModel();
$visibleColumns[] = static::pk();
$sectionsVisibleColumns[] = static::sectionPk();
$raw = array('SELECT' => $visibleColumns, 'FILTER' => $this->arFilter, 'SORT' => $sort);
foreach ($this->fields as $name => $settings) {
if (isset($settings['VIRTUAL']) and $settings['VIRTUAL'] == true) {
$key = array_search($name, $visibleColumns);
unset($visibleColumns[$key]);
unset($this->arFilter[$name]);
unset($sort[$name]);
}
if (isset($settings['FORCE_SELECT']) and $settings['FORCE_SELECT'] == true) {
$visibleColumns[] = $name;
}
}
$visibleColumns = array_unique($visibleColumns);
$sectionsVisibleColumns = array_unique($sectionsVisibleColumns);
// Поля для селекта (перевернутый массив)
$listSelect = array_flip($visibleColumns);
foreach ($this->fields as $code => $settings) {
$widget = $this->createWidgetForField($code);
$widget->changeGetListOptions($this->arFilter, $visibleColumns, $sort, $raw);
// Множественные поля не должны быть в селекте
if (!empty($settings['MULTIPLE'])) {
unset($listSelect[$code]);
}
}
// Поля для селекта (множественные поля отфильтрованы)
$listSelect = array_flip($listSelect);
if ($sectionEditHelper) {
$mixedData = $this->getMixedData($sectionsVisibleColumns, $visibleColumns, $sort, $raw);
$res = new \CDbResult();
$res->InitFromArray($mixedData);
$res = new \CAdminResult($res, $this->getListTableID());
$res->nSelectedCount = $this->totalRowsCount;
// используем кастомный NavStart что бы определить правильное количество страниц и элементов в списке
$this->customNavStart($res);
$this->list->NavText($res->GetNavPrint(Loc::getMessage("PAGES")));
while ($data = $res->NavNext(false)) {
$this->modifyRowData($data);
if ($data['IS_SECTION']) {
list($link, $name) = $this->getRow($data, $this->getHelperClass(AdminSectionEditHelper::className()));
$row = $this->list->AddRow('s' . $data[$this->pk()], $data, $link, $name);
foreach ($this->sectionFields as $code => $settings) {
if (in_array($code, $sectionsVisibleColumns)) {
$this->addRowSectionCell($row, $code, $data);
}
}
$row->AddActions($this->getRowActions($data, true));
} else {
$this->modifyRowData($data);
list($link, $name) = $this->getRow($data);
// объединение полей элемента с полями раздела
foreach ($this->tableColumnsMap as $elementCode => $sectionCode) {
if (isset($data[$elementCode])) {
$data[$sectionCode] = $data[$elementCode];
}
}
$row = $this->list->AddRow($data[$this->pk()], $data, $link, $name);
foreach ($this->fields as $code => $settings) {
$this->addRowCell($row, $code, $data, isset($this->tableColumnsMap[$code]) ? $this->tableColumnsMap[$code] : false);
}
$row->AddActions($this->getRowActions($data));
}
}
} else {
$res = $this->getData($className, $this->arFilter, $listSelect, $sort, $raw);
$res = new \CAdminResult($res, $this->getListTableID());
$res->NavStart();
$this->list->NavText($res->GetNavPrint(Loc::getMessage("PAGES")));
while ($data = $res->NavNext(false)) {
$this->modifyRowData($data);
list($link, $name) = $this->getRow($data);
$row = $this->list->AddRow($data[$this->pk()], $data, $link, $name);
foreach ($this->fields as $code => $settings) {
$this->addRowCell($row, $code, $data);
}
$row->AddActions($this->getRowActions($data));
}
}
$this->list->AddFooter($this->getFooter($res));
$this->list->AddGroupActionTable($this->getGroupActions(), $this->groupActionsParams);
$this->list->AddAdminContextMenu($this->getContextMenu());
$this->list->BeginPrologContent();
echo $this->prologHtml;
$this->list->EndPrologContent();
$this->list->BeginEpilogContent();
echo $this->epilogHtml;
$this->list->EndEpilogContent();
// добавляем ошибки в CAdminList для режимов list и frame
if (in_array($_GET['mode'], array('list', 'frame')) && is_array($this->getErrors())) {
foreach ($this->getErrors() as $error) {
$this->list->addGroupError($error);
}
}
$this->list->CheckListMode();
}
示例14: GetMessage
$row->AddField("ID", '<a href="/bitrix/admin/learn_group_edit.php?ID=' . $f_ID . '&lang=' . LANGUAGE_ID . '" title="' . GetMessage("MAIN_ADMIN_MENU_EDIT") . '">' . $f_ID . '</a>');
$row->AddCheckField("ACTIVE");
$row->AddInputField("TITLE", array("size" => "20"));
$row->AddInputField("CODE", array("size" => "10"));
$row->AddInputField("SORT", array("size" => "3"));
$arActions = array();
$arActions[] = array("ICON" => "edit", "DEFAULT" => "Y", "TEXT" => GetMessage("MAIN_ADMIN_MENU_EDIT"), "ACTION" => $lAdmin->ActionRedirect("learn_group_edit.php?lang=" . LANG . "&ID=" . $f_ID . GetFilterParams("filter_")));
$arActions[] = array("SEPARATOR" => true);
$arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("MAIN_ADMIN_MENU_DELETE"), "ACTION" => "if(confirm('" . GetMessageJS('LEARNING_CONFIRM_DEL_MESSAGE') . "')) " . $lAdmin->ActionDoGroup($f_ID, "delete", ""));
$row->AddActions($arActions);
}
// list footer
$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")));
$adminChain->AddItem(array("TEXT" => GetMessage("LEARNING_ADMIN_RESULTS"), "LINK" => ""));
$lAdmin->AddAdminContextMenu(array(array('ICON' => 'btn_new', 'TEXT' => GetMessage('LEARNING_ADD'), 'LINK' => 'learn_group_edit.php?lang=' . LANG . GetFilterParams('filter_'), 'TITLE' => GetMessage('LEARNING_ADD_ALT'))));
$lAdmin->CheckListMode();
$APPLICATION->SetTitle(GetMessage("LEARNING_ADMIN_TITLE") . ($arGroup ? ": " . $arGroup["~TEST_NAME"] . ": " . $arGroup["~USER_NAME"] : ""));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
if (defined("LEARNING_ADMIN_ACCESS_DENIED")) {
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"), false);
}
?>
<form name="form1" method="GET" action="<?php
echo $APPLICATION->GetCurPage();
?>
" onsubmit="return this.set_filter.onclick();">
<?php
$filter->Begin();
?>
示例15: array
} else {
$rsData->NavStart();
}
// build list
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("PAGES")));
while ($arRes = $rsData->NavNext(true, "f_")) {
$row = $lAdmin->AddRow($f_ID, $arRes);
$USER_FIELD_MANAGER->AddUserFields('HLBLOCK_' . $hlblock['ID'], $arRes, $row);
$can_edit = true;
$arActions = array();
$arActions[] = array("ICON" => "edit", "TEXT" => GetMessage($can_edit ? "MAIN_ADMIN_MENU_EDIT" : "MAIN_ADMIN_MENU_VIEW"), "ACTION" => $lAdmin->ActionRedirect("highloadblock_row_edit.php?ENTITY_ID=" . $hlblock['ID'] . '&ID=' . $f_ID . '&lang=' . LANGUAGE_ID), "DEFAULT" => true);
$arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("MAIN_ADMIN_MENU_DELETE"), "ACTION" => "if(confirm('" . GetMessageJS('HLBLOCK_ADMIN_DELETE_ROW_CONFIRM') . "')) " . $lAdmin->ActionRedirect("highloadblock_row_edit.php?action=delete&ENTITY_ID=" . $hlblock['ID'] . '&ID=' . $f_ID . '&lang=' . LANGUAGE_ID . '&' . bitrix_sessid_get()));
$row->AddActions($arActions);
}
// view
$lAdmin->AddAdminContextMenu(array(array("TEXT" => GetMessage('HLBLOCK_ADMIN_ROWS_ADD_NEW_BUTTON'), "TITLE" => GetMessage('HLBLOCK_ADMIN_ROWS_ADD_NEW_BUTTON'), "LINK" => "highloadblock_row_edit.php?ENTITY_ID=" . $ENTITY_ID . "&lang=" . LANGUAGE_ID, "ICON" => "btn_new")));
$lAdmin->CheckListMode();
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
?>
<form name="find_form" method="GET" action="<?php
echo $APPLICATION->GetCurPage();
?>
?ENTITY_ID=<?php
echo $hlblock['ID'];
?>
">
<?php
$filter->Begin();
?>
<tr>
<td>ID</td>