<?
include($_SERVER["DOCUMENT_ROOT"]."/bitrix/templates/.default/lang/ru/content.php");
include($_SERVER["DOCUMENT_ROOT"]."/bitrix/php_interface/functions.php");
//Если это home.php или корень сайта
if( !preg_match('/home.php$/', $_SERVER['SCRIPT_NAME']) ):
//Если это корневая страница статей - находим первый заполненный пункт меню и редиректим на него
$temp = str_replace("http://".$_SERVER["SERVER_NAME "], "", $_SERVER["REQUEST_URI"]);
$temp = substr($temp, 1, strpos($temp, "/", 1)-1);
if( $_REQUEST['SECTION_ID'] == "" && $temp == "articles")
{
$temp = open_first(6, "", true);
//echo "!".$temp."!";
header('Location: http://***/articles/?SECTION_ID='.$temp['SECTION_ID']."&ELEMENT_ID=".$temp['ELEMENT_ID']);
exit;
}
elseif( $_REQUEST['SECTION_ID'] != "" && $_REQUEST['ELEMENT_ID'] == "" && $temp == "articles")
{
$s_id = $_REQUEST['SECTION_ID'];
$res = CIBlockSection::GetByID($s_id);
if($ar_result = $res->GetNext())
{
if( trim($ar_result['DESCRIPTION']) == "" && GetUserField ("IBLOCK_6_SECTION", $s_id, "UF_MATERIAL") == "")
{
$temp = open_first(6, $s_id, true);
header('Location: http://***/articles/?SECTION_ID='.$temp['SECTION_ID']."&ELEMENT_ID=".$temp['ELEMENT_ID']."&SUBSECTION_ID=".$temp['SUBSECTION_ID']."&IBLOCK_ID=".$temp['IBLOCK_ID']);
exit;
}
}
}
endif; //home.php
?>
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?= LANG_CHARSET;?>">
<META NAME="ROBOTS" content="ALL">
<?$APPLICATION->ShowMeta("keywords")?>
<?$APPLICATION->ShowMeta("description")?>
<title>50-летие Зеленограда - <?$APPLICATION->ShowTitle()?></title>
<?$APPLICATION->ShowCSS();?>
<? $APPLICATION->ShowPanel(); ?>
<script type="text/javascript" src="/bitrix/templates/50_winter/timeline/swfobject.js"></script>
<script src="/bitrix/templates/.default/set/start.js"></script>
<script src="/bitrix/templates/.default/set/menu.js"></script>
<script>
function Init()
{}
</script>
</head>
<body>
<script>Start();</script>
<div id="container"> <? if ($APPLICATION->GetCurPage() == "/index.php"){
if ( date("m")==1 || date("m")==2 || date("m")==3 ||date("m")==12 )
{ echo " <div id=\"winter_header\"><div><div><div>"; }
else
{ echo " <div id=\"header\"><div><div><div>"; }
}else{
echo " <div id=\"insheader\"><a href=\"".SITE_DIR."\"><!--<img src=\"/bitrix/templates/50_winter/images/spacer.gif\" width=\"200\" height=\"50\" align=\"left\" style='float: left;'>--></a><div><div><span style='float: right'><a href=\"".SITE_DIR."\"><img src=\"/bitrix/templates/50_winter/images/spacer.gif\" width=\"140\" height=\"124\"></a></span><div>";
}
/*?>
<span id="date">До юбилея <strong>
<?
$days = round((mktime(0, 0, 0, 3, 3, 2008) - time())/86400) + 1;
echo $days;
if ($days%10 == 0) {echo "</strong> дня</span>";}
if ($days%10 == 1) {echo "</strong> день</span>";}
if (($days%10 >= 2) and ($days%10 <= 4 )) {echo "</strong> дня</span>";}
//if (($days%10 >= 0) and ($days%10 <= 9 )) {echo "</strong> дней</span>";}
*/?>
<ul id="langmenu">
<li><span><img height="9" width="18" alt="Русская версия" src="/bitrix/templates/50_winter/images/langmenu-ru-img.gif" />RUS</span></li>
<li><a href="/eng/"><img height="9" width="18" alt="English Version" src="/bitrix/templates/50_winter/images/langmenu-en-img.gif" />ENG</a></li>
</ul>
<? ?>
<table cellspacing="0" cellpadding="0" id="mainmenu">
<tbody>
<tr> <td>
<ul>
<li><a href="/about/">О проекте</a></li>
<li><a href="/about/participants.php">Участники проекта</a></li>
<!--<li class="mmlast"><a href="/world/" >в мире</a></li>-->
<li class="mmlast"><a href="/event/index.php">Лента событий</a></li>
<li><a href="/foto/index.php">Фотоархив</a></li>
<li><a href="/video/index.php">Видеоархив</a></li>
<li class="mmlast"><a href="/resources">Интернет-ресурсы</a> |