<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
$URL_NAME_DEFAULT = array(
"search" => "PAGE_NAME=search",
"detail_list" => "PAGE_NAME=detail_list",
"galleries" => "PAGE_NAME=galleries&USER_ID=#USER_ID#",
"tags" => "PAGE_NAME=tags");
foreach ($URL_NAME_DEFAULT as $URL => $URL_VALUE)
{
$arParams[strToUpper($URL)."_URL"] = trim($arResult["URL_TEMPLATES"][strToLower($URL)]);
if (empty($arParams[strToUpper($URL)."_URL"]))
$arParams[strToUpper($URL)."_URL"] = $APPLICATION->GetCurPageParam($URL_VALUE, array("PAGE_NAME", "SECTION_ID", "ELEMENT_ID", "ACTION", "sessid", "edit", "order"));
$arParams["~".strToUpper($URL)."_URL"] = $arParams[strToUpper($URL)."_URL"];
$arParams[strToUpper($URL)."_URL"] = htmlspecialchars($arParams["~".strToUpper($URL)."_URL"]);
}
$sDetailListUrl = CComponentEngine::MakePathFromTemplate($arParams["DETAIL_LIST_URL"], array());
if (strpos($sDetailListUrl, "?") === false)
$sDetailListUrl .= "?";
?>
<?$result = $APPLICATION->IncludeComponent(
"bitrix:photogallery.user",
".default",
Array(
"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"],
"IBLOCK_ID" => $arParams["IBLOCK_ID"],
"PAGE_NAME" => "INDEX",
"USER_ALIAS" => $arResult["VARIABLES"]["USER_ALIAS"],
"ANALIZE_SOCNET_PERMISSION" => $arParams["ANALIZE_SOCNET_PERMISSION"],
"INDEX_URL" => $arResult["URL_TEMPLATES"]["index"],
"GALLERY_URL" => $arResult["URL_TEMPLATES"]["gallery"],
"GALLERIES_URL" => $arResult["URL_TEMPLATES"]["galleries"],
"GALLERY_EDIT_URL" => $arResult["URL_TEMPLATES"]["gallery_edit"],
"UPLOAD_URL" => $arResult["URL_TEMPLATES"]["upload"],
"RETURN_ARRAY" => "Y",
"SHOW_PHOTO_USER" => $arParams["SHOW_PHOTO_USER"],
"GALLERY_AVATAR_SIZE" => $arParams["GALLERY_AVATAR_SIZE"],
"ONLY_ONE_GALLERY" => $arParams["ONLY_ONE_GALLERY"],
"GALLERY_GROUPS" => $arParams["GALLERY_GROUPS"],
"GALLERY_SIZE" => $arParams["GALLERY_SIZE"],
"CACHE_TYPE" => $arParams["CACHE_TYPE"],
"CACHE_TIME" => $arParams["CACHE_TIME"],
"DISPLAY_PANEL" => $arParams["DISPLAY_PANEL"],
"ALBUM_PHOTO_SIZE" => $arParams["ALBUM_PHOTO_SIZE"],
"ALBUM_PHOTO_THUMBS_SIZE" => $arParams["ALBUM_PHOTO_THUMBS_SIZE"],
),
$component,
array("HIDE_ICONS" => "Y")
);?><?
if ($result === false)
return false;
if ($arParams["PERMISSION"] >= "W" && $arParams["MODERATE"] == "Y"):
?><div class="photo-controls photo-action">
<a href="<?=$sDetailListUrl."&moderate=Y"?>" class="photo-action photo-moderate"><?=GetMessage("P_NOT_APPROVED")?></a>
</div><?
endif;
?><div class="empty-clear"></div>
<div id="photo-main-div"><?
$arShows = array("SHOW_RATING" => "N", "SHOW_COMMENTS" => "N", "SHOW_SHOWS" => "N");
$sSortField = "ID";
$res = array();
if ($arParams["MODERATE"] == "Y")
$res["PROPERTY_APPROVE_ELEMENT"] = "Y";
if ($arParams["SHOW_ONLY_PUBLIC"] == "Y")
$res["PROPERTY_PUBLIC_ELEMENT"] = "Y";
$res_best = $res;
if ($arParams["USE_RATING"] == "Y")
{
$res_best[">PROPERTY_RATING"] = "0";
$arShows["SHOW_RATING"] = "Y";
$sSortField = "rating";
}
elseif ($arParams["USE_COMMENTS"] == "Y")
{
if ($arParams["COMMENTS_TYPE"] == "FORUM")
$res_best[">PROPERTY_FORUM_MESSAGE_CNT"] = "0";
else
$res_best[">PROPERTY_BLOG_COMMENTS_CNT"] = "0";
$arShows["SHOW_COMMENTS"] = "Y";
$sSortField = "comments";
}
else
{
$arShows["SHOW_SHOWS"] = "Y";
$sSortField = "shows";
}
?><table border="0" cellpadding="0" cellspacing="0" id="photo-main-table">
<tr><td id="photo-main-td-left">
<div id="photo-main-div-best">
<?$element_id = $APPLICATION->IncludeComponent(
"bitrix:photogallery.detail.list",
"simple",
|