SetTitle("Main page"); //echo ""; // создаем объект $obCache = new CPageCache; // время кеширования - 30 минут //$life_time = 30*60; $life_time = 0; if($USER->IsAuthorized()) $authorized = "authorized"; else $authorized = "unauthorized"; // формируем идентификатор кеша в зависимости от всех параметров // которые могут повлиять на результирующий HTML $cache_id = "tmt.main_page".$authorized; // инициализируем буферизирование вывода if($obCache->StartDataCache($life_time, $cache_id, "/")): $day = date('d') + 1; $month = date('m'); $year = date('y'); $tomorrow = $month."/".$day."/".$year; $last_item_res = GetIBlockElementList(43, false, Array("ACTIVE_FROM"=>"DESC"), 1);//, Array("<=DATE_ACTIVE_FROM"=>$tomorrow)); $last_item = $last_item_res->GetNext(); $start_date = $last_item["ACTIVE_FROM"];//date('m/d/Y', strtotime($last_item["ACTIVE_FROM"])); $issue_id = $last_item["ID"]; $GLOBALS["USED_IDS"] = Array (); ?>
Due to the May holidays, The Moscow Times will not be published May 9-12. The paper will come out on May 13. */?> */?> $min_time1 && $cur_time1 < $max_time1): ?>
Due to the May 1 holiday, The Moscow Times will not be publishing
news online on Sunday, April 29, or Monday, April 30.
$min_time && $cur_time < $max_time): ?>

Year in Review: When Reality Cut In

/img/top_block/Filonov-Elka-balls.jpg" width="706" height="353" alt="Year in Review: When Reality Cut In" title="Year in Review: When Reality Cut In">
Vladimir Filonov / MT
What 2011 will represent for Russia - the start of something, the end of somebody - nobody knows. But it was a year when the curtain was slid aside and those behind the controls revealed. Or when people, who always knew of the men behind the curtain, decided to take notice.
'.var_export($TopTopic, true)); ?>
"ARTICLES")); while($ar_props = $db_props->Fetch()) $TopArticles[] = $ar_props["VALUE"]; $used = Array (); shuffle($TopArticles); foreach($TopArticles as $ArtElement) { $arElement = GetIBlockElement ($ArtElement); $db_props = CIBlockElement::GetProperty($arElement["IBLOCK_ID"], $arElement["ID"], "sort", "asc"); while($ar_props = $db_props->Fetch()) $arElement["PROPERTIES"][$ar_props["CODE"]]["VALUE"] = $ar_props["VALUE"]; $arElement["PROPERTIES"]["AUTHOR"] = Array (); $arElement["PROPERTIES"]["AUTHOR"]["VALUE"] = Array (); $db_props = CIBlockElement::GetProperty($arElement["IBLOCK_ID"], $arElement["ID"], "sort", "asc", Array ("CODE"=>"AUTHOR")); while($ar_props = $db_props->Fetch()) $arElement["PROPERTIES"]["AUTHOR"]["VALUE"][] = $ar_props["VALUE"]; include ($_SERVER["DOCUMENT_ROOT"]."/blocks/byline.php"); $Picture = false; if(!empty($arElement["PROPERTIES"]["EDITORS_PHOTO"]["VALUE"])) { $rsFile = CFile::GetByID($arElement["PROPERTIES"]["EDITORS_PHOTO"]["VALUE"]); $Picture = $rsFile->Fetch(); } if($Picture): $i++; ?> =3) break;?>
.html"> /upload//" width="" height="" alt="" title="">

.html">

"DESC","SORT"=>"ASC"), 0);//, Array (">=PROPERTY_ISSUE"=>$issue_id));//, Array("<=DATE_ACTIVE_FROM"=>$tomorrow)); while($arElement = $top_block_items->GetNext()): $count++; if($count == 1): ?>
Fetch()) $arElement["PROPERTIES"][$ar_props["CODE"]] = $ar_props; $arElement["PROPERTIES"]["AUTHOR"]["VALUE"] = Array(); $db_props = CIBlockElement::GetProperty($arElement["IBLOCK_ID"], $arElement["ID"], "sort", "asc", Array("CODE"=>"AUTHOR")); while($ar_props = $db_props->Fetch()) $arElement["PROPERTIES"]["AUTHOR"]["VALUE"][] = $ar_props["VALUE"]; include ($_SERVER["DOCUMENT_ROOT"]."/blocks/byline.php"); //echo "
";print_r($arElement["PROPERTIES"]["TOP_BLOCK_PHOTO"]);echo"
"; $Picture = ''; if(!empty($arElement["PROPERTIES"]["TOP_BLOCK_PHOTO"]["VALUE"])) { $rsFile = CFile::GetByID($arElement["PROPERTIES"]["TOP_BLOCK_PHOTO"]["VALUE"]); $Picture = $rsFile->Fetch(); } include ($_SERVER["DOCUMENT_ROOT"]."/blocks/show_time.php"); $GLOBALS["USED_IDS"][] = $arElement["ID"]; ?>

/upload//" width="" height="" alt="" title="">
0): ?>
"frontpage_top_element_list", "IBLOCK_ID" => "42", "SECTION_ID" => "600", "ELEMENT_SORT_FIELD" => "sort", "ELEMENT_SORT_ORDER" => "asc", "INCLUDE_SUBSECTIONS" => "N", "SECTION_URL" => "/#SECTION_NAME#/", "DETAIL_URL" => "#ELEMENT_ID#/", "PAGE_ELEMENT_COUNT" => "2", "SET_TITLE" => "N", ); $ArticlesListBlockFilter = Array ( "!PREVIEW_PICTURE" => false, // "<=SORT" => "100", ">=PROPERTY_ISSUE" => $issue_id, // ">=DATE_ACTIVE_FROM" => $start_date, //date('m/d/Y'), "!%ID" => $GLOBALS["USED_IDS"], ); include("blocks/article_list.php"); $ArticlesListBlockFilter = ''; ?> "frontpage_element_list", "IBLOCK_ID" => "42", "SECTION_ID" => "600", "ELEMENT_SORT_FIELD" => "sort", "ELEMENT_SORT_ORDER" => "asc", "INCLUDE_SUBSECTIONS" => "N", "SECTION_URL" => "/#SECTION_NAME#/", "DETAIL_URL" => "#ELEMENT_ID#/", "PAGE_ELEMENT_COUNT" => "4", "SET_TITLE" => "N", ); $ArticlesListBlockFilter = Array ( "!PREVIEW_PICTURE" => false, "<=SORT" => "100", ">=PROPERTY_ISSUE" => $issue_id, "!%ID" => $GLOBALS["USED_IDS"], // ">=DATE_ACTIVE_FROM" => $start_date, //date('m/d/Y'), ); include("blocks/article_list.php"); $ArticlesListBlockFilter = ''; ?>
"frontpage_photo", "IBLOCK_ID" => "47", "SECTION_ID" => "601", "ELEMENT_SORT_FIELD" => "active_from", "ELEMENT_SORT_ORDER" => "desc", "INCLUDE_SUBSECTIONS" => "N", "SECTION_URL" => "", //"section.php?id=#SECTION_ID#", "DETAIL_URL" => "", "PAGE_ELEMENT_COUNT" => "1", "SET_TITLE" => "N", "PROPERTY_CODE" => Array("","200"), ); include("blocks/photo.php"); ?>
*/?> GetUserGroupArray()) ): */?>


"frontpage_more_headlines", "IBLOCK_ID" => "42", "SECTION_ID" => "600", "ELEMENT_SORT_FIELD" => "sort", "ELEMENT_SORT_ORDER" => "asc", "INCLUDE_SUBSECTIONS" => "N", "SECTION_URL" => "/#SECTION_NAME#/", "DETAIL_URL" => "#ELEMENT_ID#/", "PAGE_ELEMENT_COUNT" => "12", "SET_TITLE" => "N", ); $ArticlesListBlockFilter = Array ( ">=PROPERTY_ISSUE" => $issue_id, // ">=DATE_ACTIVE_FROM" => $start_date, //date('m/d/Y'), "!%ID" => $GLOBALS["USED_IDS"], // ">SORT" => "50", ); include("blocks/article_list.php"); $ArticlesListBlockFilter = ''; ?> */ ?>



"42", "SECTION_ID" => "1013", "PAGE_ELEMENT_COUNT" => "7", "INCLUDE_SUBSECTIONS" => "N", "SECTION_URL" => true, "SECTION_URL_START" => "", ); //include("blocks/article_list.php"); include ($_SERVER["DOCUMENT_ROOT"]."/blocks/opinion.php"); ?> = 21) || $dow == 4 || $dow == 5 || $dow == 6 || $dow == 7) include("blocks/calendar.php"); else include("blocks/beyond_moscow.php"); ?> "42", "SECTION_ID" => "1016", "PAGE_ELEMENT_COUNT" => "7", "INCLUDE_SUBSECTIONS" => "Y", "SECTION_URL" => true, "SECTION_URL_START" => "", ); //include("blocks/article_list.php"); include ($_SERVER["DOCUMENT_ROOT"]."/blocks/opinion.php"); ?>
Editors' picks
""), 4); while($arElement = $items->GetNext()): //echo "
"; print_r ($arElement); echo "
"; $db_props = CIBlockElement::GetProperty($arElement["IBLOCK_ID"], $arElement["ID"], "sort", "asc", Array("CODE"=>"EDITORS_PHOTO")); while($ar_props = $db_props->Fetch()) $arElement["EDITORS_PHOTO"] = $ar_props["VALUE"]; $db_old_groups = CIBlockElement::GetElementGroups($arElement["ID"], true); $ar_groups = Array(); while($ar_group = $db_old_groups->Fetch()) if($ar_group["ID"] != 600 && $ar_group["ID"] != 1368) $ar_groups[] = $ar_group; $current_section = $ar_groups[0]; $section_url = strtolower (str_replace (' ', '_', str_replace ('&', 'n', $current_section["NAME"]))); $rsFile = CFile::GetByID($arElement["EDITORS_PHOTO"]); $arFile = $rsFile->Fetch(); $max_width = 160; //220; if($arFile["WIDTH"] > $max_width) { $print_width = ' width="150" orig_width="'.$max_width.'"'; $print_height = ceil ($arFile["HEIGHT"] / ($arFile["WIDTH"] / $max_width)); $print_height = ' orig_height="'.$print_height.'"'; } else { $print_width = ' width="150" orig_width="'.$arFile["WIDTH"].'"'; $print_height = ' orig_height="'.$arFile["HEIGHT"].'"'; } $EPArticleURL = Name2URL($arElement["NAME"]); ?>


GetUserGroupArray())):?>
"42", "SECTION_ID" => "1032", "PAGE_ELEMENT_COUNT" => "7", "INCLUDE_SUBSECTIONS" => "N", "SECTION_URL" => false, "SECTION_URL_START" => "", "ARTICLE_URL_START" => "realestate", ); //include("blocks/article_list.php"); include ($_SERVER["DOCUMENT_ROOT"]."/blocks/opinion_tall.php"); ?>
"42", "SECTION_ID" => "1470", "PAGE_ELEMENT_COUNT" => "7", "INCLUDE_SUBSECTIONS" => "N", "SECTION_URL" => false, "SECTION_URL_START" => "", "ARTICLE_URL_START" => "careercenter", "TITLE" => "Career Center", ); //include("blocks/article_list.php"); include ($_SERVER["DOCUMENT_ROOT"]."/blocks/opinion_tall.php"); ?>

Multimedia
"DESC", "SORT"=>"ASC", "ID"=>"DESC"), 1); if(!$video = $items->GetNext ()) $photos_count = 4; $last = true; $video["DETAIL_TEXT"] = html_entity_decode($video["DETAIL_TEXT"]); if(preg_match ('#http://www.youtube.com/#', $video["DETAIL_TEXT"])) { $video["URL"] = preg_replace ("#^(.*)http://www.youtube.com/(.*?)($|\")(.*)#s", "$2", $video["DETAIL_TEXT"]); $video["PLAYER_CODE"] = ' '; } else $has_video = false; if($has_video) { $db_props = CIBlockElement::GetProperty($video["IBLOCK_ID"], $video["ID"], "sort", "asc"); while($ar_props = $db_props->Fetch()) $video["PROPERTIES"][$ar_props["CODE"]] = $ar_props["VALUE"]; $video["PICTURE"] = false; if(!empty ($video["DETAIL_PICTURE"])) { $rsFile = CFile::GetByID($video["DETAIL_PICTURE"]); $video["PICTURE"] = $rsFile->Fetch(); $video["PICTURE"]["URL"] = "/upload/".$video["PICTURE"]["SUBDIR"]."/".$video["PICTURE"]["FILE_NAME"]; } ?> "asc", "ID"=>"desc"), 1, Array ("CODE"=>"dilbert")); if($arSection = $items->GetNext()): $rsFile = CFile::GetByID($arSection["PICTURE"]); $arFile = $rsFile->Fetch(); $max_width = 160; //220; if($arFile["WIDTH"] > $max_width) { $print_width = ' width="150" orig_width="'.$max_width.'"'; $print_height = ceil ($arFile["HEIGHT"] / ($arFile["WIDTH"] / $max_width)); $print_height = ' orig_height="'.$print_height.'"'; } else { $print_width = ' width="150" orig_width="'.$arFile["WIDTH"].'"'; $print_height = ' orig_height="'.$arFile["HEIGHT"].'"'; } ?> "asc", "ID"=>"desc"), 2, Array ("!CODE"=>"dilbert")); //if($arSection = $items->GetNext()): while($arSection = $items->GetNext()): $rsFile = CFile::GetByID($arSection["DETAIL_PICTURE"]); $arFile = $rsFile->Fetch(); $max_width = 160; //220; if($arFile["WIDTH"] > $max_width) { $print_width = ' width="150" orig_width="'.$max_width.'"'; $print_height = ceil ($arFile["HEIGHT"] / ($arFile["WIDTH"] / $max_width)); $print_height = ' orig_height="'.$print_height.'"'; } else { $print_width = ' width="150" orig_width="'.$arFile["WIDTH"].'"'; $print_height = ' orig_height="'.$arFile["HEIGHT"].'"'; } ?>



"DESC"), 7); if($arElement = $items->GetNext ()): $db_props = CIBlockElement::GetProperty($arElement["IBLOCK_ID"], $arElement["ID"], "sort", "asc"); while($ar_props = $db_props->Fetch()) $arElement["PROPERTIES"][$ar_props["CODE"]] = $ar_props; $blog = GetIBlockElement ($arElement["PROPERTIES"]["BLOG"]["VALUE"]); $db_props = CIBlockElement::GetProperty($blog["IBLOCK_ID"], $blog["ID"], "sort", "asc"); while($ar_props = $db_props->Fetch()) $blog[$ar_props["CODE"]] = $ar_props["VALUE"]; if($arElement["PREVIEW_PICTURE"]) { $rsFile = CFile::GetByID($arElement["PREVIEW_PICTURE"]); $Picture = $rsFile->Fetch(); $Picture["URL"] = "/upload/".$Picture["SUBDIR"]."/".$Picture["FILE_NAME"]; } elseif($blog["PREVIEW_PICTURE"]) { $rsFile = CFile::GetByID($blog["PREVIEW_PICTURE"]); $Picture = $rsFile->Fetch(); $Picture["URL"] = "/upload/".$Picture["SUBDIR"]."/".$Picture["FILE_NAME"]; } $Picture["ALT"] = $blog["NAME"].": ".$arElement["NAME"]; $Picture["LINK"] = "/blogs/".$blog["ID"]."/post/".Name2URL($arElement["NAME"])."/".$arElement["ID"].".html"; $arElement["PROPERTIES"]["AUTHOR"]["VALUE"] = Array(); $db_props = CIBlockElement::GetProperty($arElement["IBLOCK_ID"], $arElement["ID"], "sort", "asc", Array("CODE"=>"AUTHOR")); while($ar_props = $db_props->Fetch()) $arElement["PROPERTIES"]["AUTHOR"]["VALUE"][] = $ar_props["VALUE"]; include ($_SERVER["DOCUMENT_ROOT"]."/blocks/byline.php"); if(empty($authors) && empty($datasource)) { $rsUser = CUser::GetByID($arElement["CREATED_BY"]); $arUser = $rsUser->Fetch(); $authors = 'By '.$arUser["NAME"]." ".$arUser["LAST_NAME"]; } if(!empty($blog["ANONYMUS"])) { $authors = ''; $datasource = ''; } ?>
Blogs
.html">/upload//" alt="" title="">

*/ ?>
    GetNext()): $db_props = CIBlockElement::GetProperty($arElement["IBLOCK_ID"], $arElement["ID"], "sort", "asc"); while($ar_props = $db_props->Fetch()) $arElement["PROPERTIES"][$ar_props["CODE"]] = $ar_props; $Picture = 0; $blog = GetIBlockElement ($arElement["PROPERTIES"]["BLOG"]["VALUE"]); if($arElement["PREVIEW_PICTURE"]) { $rsFile = CFile::GetByID($arElement["PREVIEW_PICTURE"]); $Picture = $rsFile->Fetch(); $Picture["URL"] = "/upload/".$Picture["SUBDIR"]."/".$Picture["FILE_NAME"]; } elseif($blog["PREVIEW_PICTURE"]) { $rsFile = CFile::GetByID($blog["PREVIEW_PICTURE"]); $Picture = $rsFile->Fetch(); $Picture["URL"] = "/upload/".$Picture["SUBDIR"]."/".$Picture["FILE_NAME"]; } $Picture["ALT"] = $blog["NAME"].": ".$arElement["NAME"]; $Picture["LINK"] = "/blogs/".$blog["ID"]."/post/".Name2URL($arElement["NAME"])."/".$arElement["ID"].".html"; $arElement["PROPERTIES"]["AUTHOR"]["VALUE"] = Array(); $db_props = CIBlockElement::GetProperty($arElement["IBLOCK_ID"], $arElement["ID"], "sort", "asc", Array("CODE"=>"AUTHOR")); while($ar_props = $db_props->Fetch()) $arElement["PROPERTIES"]["AUTHOR"]["VALUE"][] = $ar_props["VALUE"]; include ($_SERVER["DOCUMENT_ROOT"]."/blocks/byline.php"); if(empty($authors) && empty($datasource)) { $rsUser = CUser::GetByID($arElement["CREATED_BY"]); $arUser = $rsUser->Fetch(); $authors = 'By '.$arUser["NAME"]." ".$arUser["LAST_NAME"]; } if(!empty($blog["ANONYMUS"])) { $authors = ''; $datasource = ''; } ?>
  • .html">: /post//.html">

The Moscow Times Recommends
Business
"frontpage_more_headlines", "IBLOCK_ID" => "62", "SECTION_ID" => "1168", "ELEMENT_SORT_FIELD" => "sort", "ELEMENT_SORT_ORDER" => "asc", "INCLUDE_SUBSECTIONS" => "N", "SECTION_URL" => "/#SECTION_NAME#/", "DETAIL_URL" => "#ELEMENT_ID#/", "PAGE_ELEMENT_COUNT" => "7", "SET_TITLE" => "N", ); include("blocks/article_list.php"); ?>
Culture
"frontpage_more_headlines", "IBLOCK_ID" => "62", "SECTION_ID" => "1167", "ELEMENT_SORT_FIELD" => "sort", "ELEMENT_SORT_ORDER" => "asc", "INCLUDE_SUBSECTIONS" => "N", "SECTION_URL" => "/#SECTION_NAME#/", "DETAIL_URL" => "#ELEMENT_ID#/", "PAGE_ELEMENT_COUNT" => "7", "SET_TITLE" => "N", ); include("blocks/article_list.php"); ?>
EndDataCache(); endif; ?>
GetUserGroupArray())):?>
Poll:

vote

*/?>
Quick Poll

*/?> IsAuthorized()) $authorized = "authorized"; else $authorized = "unauthorized"; // формируем идентификатор кеша в зависимости от всех параметров // которые могут повлиять на результирующий HTML $cache_id = "tmt.main_page.right_column".$authorized; // инициализируем буферизирование вывода if($obCache->StartDataCache($life_time, $cache_id, "/")): ?> EndDataCache(); endif; ?>