本文整理汇总了PHP中PhotoDateFormat函数的典型用法代码示例。如果您正苦于以下问题:PHP PhotoDateFormat函数的具体用法?PHP PhotoDateFormat怎么用?PHP PhotoDateFormat使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PhotoDateFormat函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<!-- Photo List <?php
echo $arParams["ID"];
?>
-->
<div class="empty-clear"></div>
<?php
foreach ($arResult["ELEMENTS_LIST"] as $key => $arItem) {
if (!is_array($arItem)) {
continue;
} elseif ($arParams["SHOW_DATE"] == "Y") {
$this_date = PhotoFormatDate($arItem["~DATE_CREATE"], "DD.MM.YYYY HH:MI:SS", "d.m.Y");
if ($this_date != $current_date) {
$current_date = $this_date;
?>
<div class="group-by-days photo-date"><?php
echo PhotoDateFormat($arParams["NEW_DATE_TIME_FORMAT"], MakeTimeStamp($this_date, "DD.MM.YYYY"));
?>
</div><?php
}
}
$title = isset($arItem["PREVIEW_TEXT"]) && $arItem["PREVIEW_TEXT"] != '' ? $arItem["PREVIEW_TEXT"] : $arItem["NAME"];
$arItem["TITLE"] = $title . ($arItem["ACTIVE"] != "Y" ? GetMessage("P_PHOTO_NOT_APPROVED") : "");
if ($arParams["SHOW_COMMENTS"] != "N") {
$arItem["COMMENTS"] = intVal($arParams["COMMENTS_TYPE"] != "blog" ? $arItem["PROPERTIES"]["FORUM_MESSAGE_CNT"]["VALUE"] : $arItem["PROPERTIES"]["BLOG_COMMENTS_CNT"]["VALUE"]);
}
call_user_func("__photo_template_" . $sTemplateName, $arItem, $arParams, $this);
}
?>
<div class="empty-clear"></div>
<!-- Photo List End <?php
echo $arParams["ID"];
示例2: elseif
return false;
} elseif ($res == 301) {
$url = CComponentEngine::MakePathFromTemplate($arParams["~SECTION_URL"], array("USER_ALIAS" => $arGallery["CODE"], "SECTION_ID" => $arParams["SECTION_ID"]));
if ($url == POST_FORM_ACTION_URI) {
$url = CComponentEngine::MakePathFromTemplate($arParams["~INDEX_URL"], array());
}
LocalRedirect($url, false, "301 Moved Permanently");
return false;
} elseif (!$oPhoto->CheckPermission($arParams["PERMISSION"], $arResult["SECTION"])) {
if ($arParams["SET_TITLE"] == "Y") {
$GLOBALS["APPLICATION"]->SetTitle(GetMessage('P_SECTION_ACCESS_DENIED'));
}
return false;
}
if (is_array($arResult["SECTION"]["~DATE"])) {
$arResult["SECTION"]["DATE"]["VALUE"] = PhotoDateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($arResult["SECTION"]["~DATE"]["VALUE"], CSite::GetDateFormat()));
}
/********************************************************************
/Main data
********************************************************************/
/********************************************************************
Prepare Data
********************************************************************/
$url = array();
if ($arParams["BEHAVIOUR"] == "USER" && $arResult["SECTION"]["IBLOCK_SECTION_ID"] == $arResult["GALLERY"]["ID"]) {
$url["BACK_LINK"] = CComponentEngine::MakePathFromTemplate($arParams["~GALLERY_URL"], array("USER_ALIAS" => $arResult["GALLERY"]["CODE"]));
} elseif (intVal($arResult["SECTION"]["IBLOCK_SECTION_ID"]) > 0) {
$url["BACK_LINK"] = CComponentEngine::MakePathFromTemplate($arParams["~SECTION_URL"], array("USER_ALIAS" => $arParams["USER_ALIAS"], "SECTION_ID" => $arResult["SECTION"]["IBLOCK_SECTION_ID"]));
} else {
$url["BACK_LINK"] = CComponentEngine::MakePathFromTemplate($arParams["~INDEX_URL"], array());
}