本文整理汇总了PHP中CAdminContextMenu::Show方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminContextMenu::Show方法的具体用法?PHP CAdminContextMenu::Show怎么用?PHP CAdminContextMenu::Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminContextMenu
的用法示例。
在下文中一共展示了CAdminContextMenu::Show方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ShowMenu
static function ShowMenu()
{
global $APPLICATION;
$aContext = array(array("ICON" => "btn_list", "TEXT" => GetMessage("MAIN_ADMIN_MENU_LIST"), "LINK" => self::LIST_URL . "?lang=" . LANG . GetFilterParams("filter_"), "TITLE" => GetMessage("MAIN_ADMIN_MENU_LIST")));
if (!self::$notSaved) {
$aContext[] = array("ICON" => "btn_delete", "TEXT" => GetMessage("MAIN_ADMIN_MENU_DELETE"), "LINK" => "javascript:if(confirm('" . GetMessage("SUP_CONFIRM_DEL_MESSAGE") . "'))window.location='" . LIST_URL . "?lang=" . LANG . "&action=delete&ID=" . self::$holidaysFields->ID . "&" . bitrix_sessid_get() . urlencode(GetFilterParams("filter_", false)) . "';");
}
if (self::SHOW_FORM_SETTINGS) {
$link = DeleteParam(array("mode"));
$link = $APPLICATION->GetCurPage() . "?mode=settings" . ($link != "" ? "&" . $link : "");
$aContext[] = array("TEXT" => GetMessage("SUP_FORM_SETTINGS"), "TITLE" => GetMessage("SUP_FORM_SETTINGS_EX"), "LINK" => "javascript:" . self::$objCAdminForm->GetName() . ".ShowSettings('" . urlencode($link) . "')", "ICON" => "btn_settings");
}
$context = new CAdminContextMenu($aContext);
$context->Show();
}
示例2: array
if ($bContinue) {
continue;
}
}
$arReports[] = array("TEXT" => $rep_title, "ONCLICK" => "window.open('/bitrix/admin/sale_order_print_new.php?&ORDER_ID=" . $ID . "&doc=" . substr($file, 0, strlen($file) - 4) . "&" . bitrix_sessid_get() . "', '_blank');");
}
}
}
closedir($handle);
}
}
$aMenu[] = array("TEXT" => Loc::getMessage("SALE_OVIEW_TO_PRINT"), "TITLE" => Loc::getMessage("SALE_OVIEW_TO_PRINT_TITLE"), "LINK" => "/bitrix/admin/sale_order_print.php?ID=" . $ID . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_"), "MENU" => $arReports);
$aMenu[] = array("TEXT" => Loc::getMessage("SALE_OVIEW_ORDER_COPY"), "TITLE" => Loc::getMessage("SALE_OVIEW_ORDER_COPY_TITLE"), "LINK" => '/bitrix/admin/sale_order_create.php?lang=' . LANGUAGE_ID . "&SITE_ID=" . $saleOrder->getSiteId() . "&ID=" . $ID . "&" . bitrix_sessid_get() . GetFilterParams("filter_"));
$aMenu[] = array("TEXT" => Loc::getMessage("SALE_OVIEW_DELETE"), "TITLE" => Loc::getMessage("SALE_OVIEW_DELETE_TITLE"), "LINK" => "javascript:if(confirm('" . GetMessageJS("SALE_OVIEW_DEL_MESSAGE") . "')) window.location='sale_order.php?ID=" . $ID . "&action=delete&lang=" . LANGUAGE_ID . "&" . bitrix_sessid_get() . urlencode(GetFilterParams("filter_")) . "'", "WARNING" => "Y");
$context = new CAdminContextMenu($aMenu);
$context->Show();
//prepare blocks order
$defaultBlocksOrder = array("statusorder", "buyer", "delivery", "financeinfo", "payment", "additional", "basket");
$formId = "sale_order_view";
$orderBasket = new Admin\Blocks\OrderBasket($saleOrder, "BX.Sale.Admin.OrderBasketObj", "sale_order_basket", true, Admin\Blocks\OrderBasket::VIEW_MODE);
echo Admin\OrderEdit::getScripts($saleOrder, $formId);
echo Admin\Blocks\OrderInfo::getScripts();
echo Admin\Blocks\OrderBuyer::getScripts();
echo Admin\Blocks\OrderPayment::getScripts();
echo Admin\Blocks\OrderStatus::getScripts($saleOrder, $USER->GetID());
echo Admin\Blocks\OrderAdditional::getScripts();
echo Admin\Blocks\OrderFinanceInfo::getScripts();
echo Admin\Blocks\OrderShipment::getScripts();
echo Admin\Blocks\OrderAnalysis::getScripts();
echo $orderBasket->getScripts();
$fastNavItems = array();
示例3: show
/**
* Выводит детальную страницу
* @internal
*/
public function show()
{
$this->fillMenu();
$context = new \CAdminContextMenu($this->menu);
$context->Show();
$this->tabControl->BeginPrologContent();
$this->showMessages();
$this->showProlog();
$this->tabControl->EndPrologContent();
$this->tabControl->BeginEpilogContent();
$this->showEpilog();
$this->tabControl->EndEpilogContent();
$query = $this->additionalUrlParams;
if (isset($_REQUEST[$this->pk()])) {
$query[$this->pk()] = $_REQUEST[$this->pk()];
}
$this->tabControl->Begin(array('FORM_ACTION' => static::getEditPageURL($query)));
foreach ($this->tabs as $tabSettings) {
if ($tabSettings['VISIBLE']) {
$this->showTabElements($tabSettings);
}
}
$this->showEditPageButtons();
$this->tabControl->ShowWarnings('editform', array());
//TODO: дописать
$this->tabControl->Show();
}
示例4: array
die;
}
}
$APPLICATION->SetTitle($couponID == 0 ? !$multiCoupons ? Loc::getMessage('BX_SALE_DISCOUNT_COUPON_EDIT_TITLE_ADD') : Loc::getMessage('BX_SALE_DISCOUNT_COUPON_EDIT_TITLE_MULTI_ADD') : (!$copy ? Loc::getMessage('BX_SALE_DISCOUNT_COUPON_EDIT_TITLE_UPDATE', array('#ID#' => $couponID)) : Loc::getMessage('BX_SALE_DISCOUNT_COUPON_EDIT_TITLE_COPY', array('#ID#' => $couponID))));
require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_admin_after.php';
$contextMenuItems = array(array('ICON' => 'btn_list', 'TEXT' => Loc::getMessage('BX_SALE_DISCOUNT_COUPONT_CONTEXT_COUPON_LIST'), 'LINK' => 'sale_discount_coupons.php?lang=' . LANGUAGE_ID . GetFilterParams('filter_')));
if (!$subWindow && !$readOnly && $couponID > 0) {
if (!$copy) {
$contextMenuItems[] = array('SEPARATOR' => 'Y');
$contextMenuItems[] = array('ICON' => 'btn_new', 'TEXT' => Loc::getMessage('BX_SALE_DISCOUNT_COUPONT_CONTEXT_NEW'), 'LINK' => 'sale_discount_coupon_edit.php?lang=' . LANGUAGE_ID . GetFilterParams('filter_'));
$contextMenuItems[] = array('ICON' => 'btn_copy', 'TEXT' => Loc::getMessage('BX_SALE_DISCOUNT_COUPONT_CONTEXT_COPY'), 'LINK' => 'sale_discount_coupon_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $couponID . '&action=copy' . GetFilterParams('filter_'));
$contextMenuItems[] = array('ICON' => 'btn_delete', 'TEXT' => Loc::getMessage('BX_SALE_DISCOUNT_COUPON_CONTEXT_DELETE'), 'LINK' => "javascript:if(confirm('" . CUtil::JSEscape(Loc::getMessage('BX_SALE_DISCOUNT_COUPON_CONTEXT_DELETE_CONFIRM')) . "')) window.location='/bitrix/admin/sale_discount_coupons.php?lang=" . LANGUAGE_ID . "&ID=" . $couponID . "&action=delete&" . bitrix_sessid_get() . "';", 'WARNING' => 'Y');
}
}
$contextMenu = new CAdminContextMenu($contextMenuItems);
$contextMenu->Show();
unset($contextMenu, $contextMenuItems);
if (!empty($errors)) {
$errorMessage = new CAdminMessage(array('DETAILS' => implode('<br>', $errors), 'TYPE' => 'ERROR', 'MESSAGE' => Loc::getMessage('BX_SALE_DISCOUNT_COUPON_ERR_SAVE'), 'HTML' => true));
echo $errorMessage->Show();
unset($errorMessage);
}
$selectFields = array();
if (!$multiCoupons) {
$defaultValues = array('DISCOUNT_ID' => '', 'COUPON' => '', 'ACTIVE' => 'Y', 'ACTIVE_FROM' => null, 'ACTIVE_TO' => null, 'TYPE' => Internals\DiscountCouponTable::TYPE_ONE_ORDER, 'MAX_USE' => 0, 'USE_COUNT' => 0, 'USER_ID' => 0, 'DESCRIPTION' => '');
$selectFields = array('ID', 'DISCOUNT_NAME' => 'DISCOUNT.NAME');
$selectFields = array_merge($selectFields, array_keys($defaultValues));
} else {
$defaultValues = array('COUNT' => '', array('DISCOUNT_ID' => '', 'ACTIVE_FROM' => null, 'ACTIVE_TO' => null, 'TYPE' => Internals\DiscountCouponTable::TYPE_ONE_ORDER, 'MAX_USE' => 0));
}
$coupon = array();
示例5: array
<?//temporal code?>
<?if(!CSaleLocation::locationProCheckEnabled())require($DOCUMENT_ROOT."/bitrix/modules/main/include/epilog_admin.php");?>
<?if($fatalFailure):?>
<?CAdminMessage::ShowMessage(array('MESSAGE' => $fatalFailureMessage, 'type' => 'ERROR'))?>
<?else:?>
<?if($actionFailure):?>
<?CAdminMessage::ShowMessage(array('MESSAGE' => $actionFailureMessage, 'type' => 'ERROR'))?>
<?endif?>
<?
$topMenu->Show();
$args = array();
if($id)
$args['id'] = $id;
$tabControl->Begin(array(
"FORM_ACTION" => Helper::getEditUrl($args) // generally, it is not safe to leave action empty
));
$tabControl->BeginNextFormTab();
?>
<?$tabControl->BeginCustomField('LOCATIONS', Loc::getMessage('SALE_LOCATION_E_HEADING_LOCATIONS'));?>
<tr>
<tr class="heading">
示例6: Array
{
$APPLICATION->AddHeadScript('/freetrix/image_uploader/iuembed.js');
$APPLICATION->SetTitle(GetMessage('FM_ML_UPL_TITLE1'));
require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_after.php");
$aContext = Array();
$aContext[] = Array(
"TEXT" => GetMessage("FM_ML_BACK_IN_ML"),
"ICON" => "",
"LINK" => "/freetrix/admin/fileman_medialib_admin.php?lang=".LANGUAGE_ID."&".freetrix_sessid_get(),
"TITLE" => GetMessage("FM_ML_BACK_IN_ML")
);
$menu = new CAdminContextMenu($aContext);
$menu->Show();
$res = CMedialib::GetCollectionTree(array('checkByType' => true, 'typeId' => intVal($_GET['type'])));
/*
$type = intVal($_GET['type']);
$arType = CMedialib::GetTypeById($type);
if ($arType)
{
foreach ($res['Collections'] as $id => $col)
{
// Del collection escription if it has another type
if (!CMedialib::CompareTypesEx($res['Collections'][$id]['ML_TYPE'], $arType))
unset($res['Collections'][$id]);
}
}
示例7: show
/**
* {@inheritdoc}
*/
public function show()
{
if (!$this->hasReadRights()) {
$this->addErrors(Loc::getMessage('DIGITALWAND_ADMIN_HELPER_ACCESS_FORBIDDEN'));
$this->showMessages();
return false;
}
$context = new \CAdminContextMenu($this->getMenu());
$context->Show();
$this->tabControl->BeginPrologContent();
$this->showMessages();
$this->showProlog();
$this->tabControl->EndPrologContent();
$this->tabControl->BeginEpilogContent();
$this->showEpilog();
$this->tabControl->EndEpilogContent();
$query = $this->additionalUrlParams;
if (isset($_REQUEST[$this->pk()])) {
$query[$this->pk()] = $_REQUEST[$this->pk()];
} elseif (isset($_REQUEST['SECTION_ID']) && $_REQUEST['SECTION_ID']) {
$model = $this->getModel();
$this->data[$model::getSectionField()] = $_REQUEST['SECTION_ID'];
}
$this->tabControl->Begin(array('FORM_ACTION' => static::getUrl($query)));
foreach ($this->tabs as $tabSettings) {
if ($tabSettings['VISIBLE']) {
$this->showTabElements($tabSettings);
}
}
$this->showEditPageButtons();
$this->tabControl->ShowWarnings('editform', array());
//TODO: дописать
$this->tabControl->Show();
}
示例8: ShowSectionIndex
function ShowSectionIndex($menu_id, $module_id=false, $mode=false)
{
if($mode === false)
{
if(isset($_REQUEST["show_mode"]))
{
$_SESSION["ADMIN_SHOW_MODE"] = $_REQUEST["show_mode"];
CUserOptions::SetOption("view_mode", "pages", $_SESSION["ADMIN_SHOW_MODE"]);
}
elseif(!isset($_SESSION["ADMIN_SHOW_MODE"]))
$_SESSION["ADMIN_SHOW_MODE"] = CUserOptions::GetOption("view_mode", "pages");
if(!in_array($_SESSION["ADMIN_SHOW_MODE"], array("icon", "list", "table")))
$_SESSION["ADMIN_SHOW_MODE"] = "icon";
if($_REQUEST["mode"] <> "list")
{
echo '<div id="index_page_result_div">';
$sTableID = "module_index_table";
$page = $GLOBALS["APPLICATION"]->GetCurPage();
$param = DeleteParam(array("show_mode", "mode"));
echo '
<script>
var '.$sTableID.' = new JCAdminList("'.$sTableID.'");
jsUtils.addEvent(window, "unload", function(){'.$sTableID.'.Destroy(true);});
function LoadIndex(mode)
{
'.$sTableID.'.Destroy(false);
jsUtils.LoadPageToDiv("'.$page.'?show_mode="+mode+"&mode=list'.($param<>""? "&".$param:"").'", "index_page_result_div");
}
</script>
';
}
$aContext = array(
array(
"TEXT"=>GetMessage("admin_lib_index_view"),
"TITLE"=>GetMessage("admin_lib_index_view_title"),
"MENU"=>array(
array(
"ICON"=>($_SESSION["ADMIN_SHOW_MODE"] == "icon"? "checked":""),
"TEXT"=>GetMessage("admin_lib_index_view_icon"),
"TITLE"=>GetMessage("admin_lib_index_view_icon_title"),
"ACTION"=>"LoadIndex('icon');"
),
array(
"ICON"=>($_SESSION["ADMIN_SHOW_MODE"] == "list"? "checked":""),
"TEXT"=>GetMessage("admin_lib_index_view_list"),
"TITLE"=>GetMessage("admin_lib_index_view_list_title"),
"ACTION"=>"LoadIndex('list');"
),
array(
"ICON"=>($_SESSION["ADMIN_SHOW_MODE"] == "table"? "checked":""),
"TEXT"=>GetMessage("admin_lib_index_view_table"),
"TITLE"=>GetMessage("admin_lib_index_view_table_title"),
"ACTION"=>"LoadIndex('table');"
),
),
),
);
$context = new CAdminContextMenu($aContext);
$context->Show();
$mode = $_SESSION["ADMIN_SHOW_MODE"];
}
if($module_id === false)
$this->Init();
$GLOBALS["adminMenu"]->Init(($module_id !== false? array($module_id) : $this->aModules));
$GLOBALS["adminMenu"]->ShowSubmenu($menu_id, $mode);
if($_REQUEST["mode"] <> "list")
echo '</div>';
}
示例9: foreach
}
if (is_array($arDeliveryInfo[$SITE_ID]["PROFILES"])) {
foreach ($arDeliveryInfo[$SITE_ID]["PROFILES"] as $profileId => $arProfile) {
if (!array_key_exists($profileId, $arDeliveryInfo[$SITE_ID]["CONFIG"]["CONFIG_GROUPS"])) {
$configTabsCount++;
$aTabs[] = array("DIV" => "edit_" . htmlspecialcharsbx($profileId), "TAB" => htmlspecialcharsbx($arProfile["TITLE"]), "TITLE" => htmlspecialcharsbx($arProfile["TITLE"]));
}
}
}
//$aTabs[] = array("DIV" => "editbase_profiles", "TAB" => GetMessage('SALE_DH_EDIT_PROFILES'), "TITLE" => GetMessage('SALE_DH_EDIT_PROFILES_DESCR'));
//$aTabs[] = array("DIV" => "delivery2pay", "TAB" => GetMessage('SALE_TAB_DELIVERY_PAY'), "TITLE" => GetMessage('SALE_TAB_DELIVERY_PAY_DESC'));
$tabControl = new CAdminViewTabControl("tabControl", $aTabs, true, false);
$parentTabControl = new CAdminTabControl('parentTabControl', array(array("DIV" => "edit_main", "TAB" => GetMessage('SALE_DH_TAB_TITLE_EDIT'), "ICON" => "sale", "TITLE" => GetMessage('SALE_DH_TAB_TITLE_EDIT_ALT'))), true, true);
$aContext = array(array("TEXT" => GetMessage("SALE_DH_LIST"), "LINK" => "sale_delivery_handlers.php?lang=" . LANG, "TITLE" => GetMessage("SALE_DH_LIST_ALT"), "ICON" => "btn_list"));
$obContextMenu = new CAdminContextMenu($aContext);
$obContextMenu->Show();
$arConfigValues = array();
foreach ($arDeliveryInfo[$SITE_ID]["CONFIG"]["CONFIG"] as $config_id => $arConfig) {
if ($arConfig["TYPE"] != "MULTISELECT") {
$arConfigValues[$config_id] = strlen($arConfig["VALUE"]) > 0 ? $arConfig["VALUE"] : $arConfig["DEFAULT"];
} else {
if (is_set($arConfig["VALUE"]) && !is_array($arConfig["VALUE"])) {
$arConfig["VALUE"] = array("0" => $arConfig["VALUE"]);
}
if (!is_set($arConfig["VALUE"]) && is_set($arConfig["DEFAULT"]) && !is_array($arConfig["DEFAULT"])) {
$arConfig["DEFAULT"] = array("0" => $arConfig["DEFAULT"]);
}
$arConfigValues[$config_id] = count($arConfig["VALUE"]) > 0 ? $arConfig["VALUE"] : $arConfig["DEFAULT"];
}
}
?>