本文整理汇总了PHP中CSite::InDir方法的典型用法代码示例。如果您正苦于以下问题:PHP CSite::InDir方法的具体用法?PHP CSite::InDir怎么用?PHP CSite::InDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSite
的用法示例。
在下文中一共展示了CSite::InDir方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
$this->setFrameMode(true);
?>
<ul class="inner_menu">
<?php
foreach ($arResult["ITEMS"] as $arItem) {
$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_EDIT"));
$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_DELETE"), array("CONFIRM" => GetMessage('CT_BNL_ELEMENT_DELETE_CONFIRM')));
?>
<li <?php
if (CSite::InDir($arItem["DETAIL_PAGE_URL"]) || $arItem['ID'] == $arParams["VARIABLES"]["CURRENT_ELEMENT"]) {
?>
class="current"<?php
}
?>
id="<?php
echo $this->GetEditAreaId($arItem['ID']);
?>
">
<a href="<?php
echo $arItem["DETAIL_PAGE_URL"];
?>
">
<span><?php
echo $arItem["NAME"];
?>
</span>
示例2: array
<?php
if (CSite::InDir("/store/")) {
?>
</div>
<?php
}
?>
</div>
<div id="footer">
<div id="footer-Left">
<div id="Footer-logo">
<div id="Footer-Info-Left">
<?php
$APPLICATION->IncludeComponent("bitrix:main.include", "", array("COMPONENT_TEMPLATE" => ".default", "AREA_FILE_SHOW" => "sect", "AREA_FILE_SUFFIX" => "DopInfoFooter", "EDIT_TEMPLATE" => "", "AREA_FILE_RECURSIVE" => "Y"));
?>
</div>
<div id="Left-menu-Footer">
<ul class="FLM" id="FLM1">
<li><a href= "/store/index.php">Вся мебель</a></li>
<li><a href="/store/soft_furniture/index.php">Мягкая мебель</a></li>
<li><a href="/store/textile/index.php">Текстиль</a></li>
</ul>
<ul class="FLM" id="FLM2">
<li><a href="/store/kitchen/index.php">Кухня</a></li>
<li><a href="/store/office/index.php">Офис</a></li>
<li><a href="/store/decoration/index.php">Декор</a></li>
示例3: GetMessage
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
?>
<div class="display_table">
<?php
if (CSite::InDir(SITE_DIR . 'sale/')) {
?>
<h4 class="block_title"><?php
echo GetMessage("STOCK_PRODUCTS");
?>
</h4>
<?php
} elseif (CSite::InDir(SITE_DIR . 'info/brand') && $arParams["BRAND_NAME"]) {
?>
<h4 class="block_title"><?php
echo GetMessage("BRAND_PRODUCTS", array("#BRAND#" => $arParams["BRAND_NAME"]));
?>
</h4>
<?php
}
?>
<?php
$i = 1;
?>
<?php
foreach ($arResult["ITEMS"] as $arItem) {
?>
<?php
示例4: die
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();?>
<div class="filter">
<div class="top">
<ul>
<li<?if (CSite::InDir(SITE_DIR.'index.php')||(isset($_REQUEST['do_search'])&&in_array($_REQUEST['do_search'], array('tyres', 'tyres_auto')))) {?> class="selected"<?}?>><h4>Шины</h4></li>
<li<?if (isset($_REQUEST['do_search'])&&in_array($_REQUEST['do_search'], array('wheels', 'wheels_auto'))) {?> class="selected"<?}?>><h4>Диски</h4></li>
</ul>
</div>
<div class="bottom">
<div class="brd">
<? /*?<div class="banner">
<?$APPLICATION->IncludeComponent("bitrix:main.include", "", array("AREA_FILE_SHOW" => "file", "PATH" => SITE_TEMPLATE_PATH."/banners/banner-01.php"), false);?>
</div> */?>
<div class="params">
<!-- TYRES -->
<div class="fieldset">
<div class="selector">
<label><input type="hidden" name="selector1" id="f1" value=""<?echo (!isset($_REQUEST['do_search'])||isset($_REQUEST['do_search'])&&$_REQUEST['do_search']!='tyres_auto'?' checked="checked"':'')?> /> <?php
echo GetMessage("DVS_PARAMS");
?>
</label>
</div>
<!-- TYRES.PARAMS -->
<form id="tp_form" action="<?php
echo SITE_DIR;
?>
search.php" method="get" class="f1">
示例5: die
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();?>
<!-- Filter -->
<div class="filter">
<div class="tab<?if(CSite::InDir(SITE_DIR.'index.php')||(isset($_REQUEST['do_search'])&&in_array($_REQUEST['do_search'], array('tyres', 'tyres_auto')))){echo ' selected expanded';}?>">
<div class="top"><div class="pd"><h1><span><?php
echo GetMessage('DVS_TYRES');
?>
</span></h1></div></div>
<div class="bottom">
<div class="pd">
<div class="type">
<label><input type="radio" name="type1" id="f1" value=""<?echo (!isset($_REQUEST['do_search'])||isset($_REQUEST['do_search'])&&$_REQUEST['do_search']!='tyres_auto'?' checked="checked"':'')?> /> <?php
echo GetMessage('DVS_BY_PROD');
?>
</label>
<label><input type="radio" name="type1" id="f2" value=""<?echo (isset($_REQUEST['do_search'])&&$_REQUEST['do_search']=='tyres_auto'?' checked="checked"':'')?> /> <?php
echo GetMessage('DVS_AUTO');
?>
</label>
</div>
<form action="<?php
echo SITE_DIR;
?>
search.php" method="get">
<div class="form f1"<?echo (!isset($_REQUEST['do_search'])||isset($_REQUEST['do_search'])&&$_REQUEST['do_search']!='tyres_auto'?' style="display:block"':' style="display:none"')?>>
<fieldset>
<div class="label lb1"><label><?php
echo GetMessage('DVS_PROD');
示例6: define
<?php
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
die;
}
use Bitrix\Main\Page\Asset;
global $APPLICATION;
define('BASE_TEMPLATE_PATH', str_replace('\\', '/', dirname(__FILE__)));
define('BASE_TEMPLATE_URL', '/local/templates/main');
//дополнительная обработка данных, которые могут понадобиться в шаблоне
$arResult = array('isMain' => CSite::InDir('/index.php'));
if (file_exists(BASE_TEMPLATE_PATH . '/template.php')) {
$arResult = (include BASE_TEMPLATE_PATH . '/template.php');
}
//на случай, если унаследуем от этого шаблона новые, подключаем все скрипты и стили через битрикс
//$APPLICATION->AddHeadScript(BASE_TEMPLATE_URL . '/js/script.js', true);
//Asset::getInstance()->addJs(BASE_TEMPLATE_URL . '/css/style.css', true);
?>
<!DOCTYPE html>
<html>
<head>
<?php
$APPLICATION->ShowHead();
?>
<title><?php
$APPLICATION->ShowTitle();
?>
</title>
</head>
<body>
示例7: array
"CHILD_MENU_TYPE" => "subleft",
"USE_EXT" => "Y",
"DELAY" => "N",
"ALLOW_MULTI_SELECT" => "Y"
),
false
);?>
</aside>
<div class="sidearea">
<?$APPLICATION->ShowViewContent('under_sidebar_content');?>
<?$APPLICATION->IncludeComponent("bitrix:main.include", "", array("AREA_FILE_SHOW" => "file", "PATH" => SITE_DIR."include/under_sidebar.php"), false);?>
</div>
</div>
</div>
<?endif;?>
<?if(!CSite::InDir(SITE_DIR."/index.php")):?>
</div>
</div>
</div>
<?endif;?>
</div>
</div>
<footer id="footer">
<div class="container maxwidth-theme">
<div class="row">
<div class="col-md-3">
<div class="copy">
<?$APPLICATION->IncludeFile(SITE_DIR."include/copy.php", Array(), Array(
"MODE" => "html",
"NAME" => "Copyright",
)
示例8: array
<a class="left-reviews-bottom__link" href="/">Все отзывы</a>
</div>
</div>
</div>
</div>
<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
<?php
$APPLICATION->IncludeComponent("bitrix:menu", "redvent_top_menu", array("ALLOW_MULTI_SELECT" => "N", "CHILD_MENU_TYPE" => "left", "DELAY" => "N", "MAX_LEVEL" => "1", "MENU_CACHE_GET_VARS" => array(""), "MENU_CACHE_TIME" => "3600", "MENU_CACHE_TYPE" => "N", "MENU_CACHE_USE_GROUPS" => "Y", "ROOT_MENU_TYPE" => "top", "USE_EXT" => "N"));
if (!CSite::InDir('/index.php')) {
$APPLICATION->IncludeComponent("bitrix:breadcrumb", "redvent", array("PATH" => "", "SITE_ID" => "s1", "START_FROM" => "0"));
}
?>
<div style="clear:both;"></div>
<div class="pages">
<?php
if (!CSite::InDir('/index.php') && $APPLICATION->GetProperty('NO_TITLE') !== 'Y') {
?>
<?php
if ($APPLICATION->GetProperty('TITLE_SECOND') === 'Y') {
?>
<h3 class="pages-title__second">
<?php
$APPLICATION->ShowTitle();
?>
</h3>
<?php
} else {
?>
<div class="pages-title">
<div class="pages-title-first">
<div class="pages-title-first__left"></div>
示例9:
}
$isAdv = false;
if (CSite::InDir('/catalog/sale/') || CSite::InDir('/catalog/hit/') || CSite::InDir('/catalog/recommend/') || CSite::InDir('/catalog/new/') || CSite::InDir('/company/') || CSite::InDir('/info/') || CSite::InDir('/personal/index.php') || CSite::InDir('/personal/profile/') || CSite::InDir('/help/')) {
$isAdv = true;
}
if (CSite::InDir('/stores/')) {
$isStores = true;
}
if (CSite::InDir('/catalog/')) {
$isCatalog = true;
}
if (CSite::InDir('/contacts/')) {
$isContacts = true;
}
$issale = false;
if (CSite::InDir('/sale/index.php')) {
$issale = true;
}
?>
</head>
<body>
<?php
CAjax::Init();
?>
<div id="panel"><?php
$APPLICATION->ShowPanel();
?>
</div>
<div class="top_bg">
<div class="top_block">
示例10: elseif
);?>
<div id="svg-placeholder" class="hide"></div>
<div class="layout">
<!-- для главной добавить класс home-page к page, для новостей и благотворительности - news-page,
для проектов - projects-page -->
<div class="page news-page scroll-box">
<!-- если не 404 -->
<div class="header">
<div class="container clearfix">
<div class="logo-box left">
<?
$lang = '';
$href = "/";
if(CSite::InDir('/en/')){ $lang = 'en';$href = "/en/"; $GLOBALS['lang'] = 'en';}
elseif(CSite::InDir('/zh/')){ $lang = 'zh';$href = "/zh/"; $GLOBALS['lang'] = 'zh';}
else{$lang = 'ru';$href = "/"; $GLOBALS['lang'] = 'ru';}
?>
<a href="<?php
echo $href;
?>
" class="logo-link">
<svg class="icon"><use xlink:href="#logo"/></svg>
</a>
</div>
<div class="content-box right">
<!--menu-->
<?
$APPLICATION->IncludeComponent("bitrix:main.include","",Array(
"AREA_FILE_SHOW" => "file",
"PATH" => "/include/menu.php",
示例11: array
$isFrontPage = CSite::InDir(SITE_DIR . 'index.php');
?>
<?php
$isStores = CSite::InDir(SITE_DIR . 'stores/');
?>
<?php
$isCatalog = CSite::InDir(SITE_DIR . 'catalog/');
?>
<?php
$isContacts = CSite::InDir(SITE_DIR . 'contacts/');
?>
<?php
$issale = CSite::InDir(SITE_DIR . 'sale/index.php');
?>
<?php
$isAdv = CSite::InDir(SITE_DIR . 'catalog/sale/') || CSite::InDir(SITE_DIR . 'catalog/hit/') || CSite::InDir(SITE_DIR . 'catalog/recommend/') || CSite::InDir(SITE_DIR . 'catalog/new/') || CSite::InDir(SITE_DIR . 'company/') || CSite::InDir(SITE_DIR . 'info/') || CSite::InDir(SITE_DIR . 'personal/index.php') || CSite::InDir(SITE_DIR . 'personal/profile/') || CSite::InDir(SITE_DIR . 'help/');
?>
</head>
<body>
<?php
CIShop::SetJSOptions();
?>
<div id="panel"><?php
$APPLICATION->ShowPanel();
?>
</div>
<div class="top_bg">
<div class="top_block">
<?php
$APPLICATION->IncludeComponent("bitrix:system.auth.form", "top", array("REGISTER_URL" => "/auth/", "FORGOT_PASSWORD_URL" => "/auth/", "PROFILE_URL" => "/personal/", "SHOW_ERRORS" => "Y"));
示例12: array
<br>
<?
$APPLICATION->IncludeComponent(
"dvs:dvs.filter",
"filter_tyres",
array(
"IBLOCK_ID" => "5",
"B_IBLOCK_ID" => "4",
"W_IBLOCK_ID" => "7",
"W_B_IBLOCK_ID" => "6",
"A_IBLOCK_ID" => "8",
"COMPONENT_TEMPLATE" => "filter_wheels",
"USER_PROPERTY_NAME" => ""
),
false
);
?>
<?}?> */?>
<?$APPLICATION->IncludeComponent("bitrix:breadcrumb", "", array(
"START_FROM" => "0",
"PATH" => "",
"SITE_ID" => "-"
),
false,
Array()
);?>
<?if (!CSite::InDir(SITE_DIR.'index.php')) {?><h1><?$APPLICATION->ShowTitle(false);?></h1><?}?>
示例13: array
<?IncludeTemplateLangFile(__FILE__);?>
</div>
<!-- // Content -->
</div>
<!-- Footer -->
<footer>
<!-- Bottom Block -->
<div class="clear:both;"></div>
<?if (CSite::InDir(SITE_DIR.'index.php')) {?>
<div class="main_news_out">
<?$APPLICATION->IncludeComponent("bitrix:main.include", "", array("AREA_FILE_SHOW" => "file", "PATH" => SITE_DIR."include/news.php"), false);?>
</div>
<?}
else {?>
<?}?>
<div style="clear:both;"></div>
<div class="brick_wall_out">
<div class="brick_wall">
<?$APPLICATION->IncludeComponent("bitrix:main.include", "", array("AREA_FILE_SHOW" => "file", "PATH" => SITE_DIR."include/payment_post_bricks.php"), false);?>
</div>
</div>
<div style="clear:both;"></div>
<div class="bottom-block-1">
<div class="bottom-block-1_1">
示例14: Array
"CACHE_GROUPS" => "Y",
"COUNT_ELEMENTS" => "Y",
"TOP_DEPTH" => "2",
"SECTION_URL" => "/catalog/#/#SECTION_CODE#/",
"VIEW_MODE" => "TEXT",
"SHOW_PARENT_NAME" => "Y"
),
false
);
?>
<!--a href="/catalog/"><img src="<?php
echo SITE_TEMPLATE_PATH;
?>
/images/city.png" class="img-responsive center-block city"></a-->
<?endif?>
<?if(CSite::InDir('/catalog/')):?>
<?$APPLICATION->ShowViewContent('catalogMenu');?>
<?endif;?>
</div>
</nav>
<?endif?>
</header>
<section class="page_content container">
<?if(HIDE_TITLE!="Y"):?>
<h1><?php
echo $APPLICATION->ShowTitle(false);
?>
</h1>
<?endif?>
<?$APPLICATION->IncludeComponent("bitrix:menu", "submenu", Array(
"ROOT_MENU_TYPE" => "section", // Тип меню для первого уровня
示例15: array
<?php
if ($APPLICATION->GetCurPage(false) == SITE_DIR) {
?>
<?php
$GLOBALS['filter'] = array('PROPERTY_FOOTER' => false);
$APPLICATION->IncludeFile(SITE_DIR . "include/slider.php", array(), array("MODE" => "html", "NAME" => 'slider', "TEMPLATE" => "section_include_template.php"));
?>
<?php
$APPLICATION->IncludeFile(SITE_DIR . "include/shop-info.php", array(), array("MODE" => "html", "NAME" => GetMessage('HEADER_INFO'), "TEMPLATE" => "section_include_template.php"));
?>
<div id="main">
<?php
} else {
?>
<?php
if (CSite::InDir(SITE_DIR . "about/contacts/")) {
?>
<div class="page-map" style="margin-top:0;">
<?php
$APPLICATION->IncludeFile(SITE_DIR . "include/contacts-map.php", array(), array("MODE" => "html", "NAME" => GetMessage('HEADER_MAP'), "TEMPLATE" => ""));
?>
<?php
} else {
?>
<div class="page-image">
<?php
if ($APPLICATION->GetProperty("page-image")) {
?>
<img alt="image" src="<?php
echo $APPLICATION->ShowProperty("page-image");
?>