本文整理汇总了PHP中ConvertDateTime函数的典型用法代码示例。如果您正苦于以下问题:PHP ConvertDateTime函数的具体用法?PHP ConvertDateTime怎么用?PHP ConvertDateTime使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ConvertDateTime函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CheckFilter
function CheckFilter()
{
global $arFilterFields, $lAdmin;
foreach ($arFilterFields as $s) {
global ${$s};
}
$str = "";
$find_date_1 = trim($find_date_1);
$find_date_2 = trim($find_date_2);
if (strlen($find_date_1) > 0 || strlen($find_date_2) > 0) {
$date_1_stm = MkDateTime(ConvertDateTime($find_date_1, "D.M.Y"), "d.m.Y");
$date_2_stm = MkDateTime(ConvertDateTime($find_date_2, "D.M.Y") . " 23:59:59", "d.m.Y H:i:s");
if (!$date_1_stm && strlen(trim($find_date_1)) > 0) {
$bGotErr = true;
$lAdmin->AddUpdateError(GetMessage("VOTE_WRONG_DATE_FROM"));
}
if (!$date_2_stm && strlen(trim($find_date_2)) > 0) {
$bGotErr = true;
$lAdmin->AddUpdateError(GetMessage("VOTE_WRONG_DATE_TILL"));
}
if (!$bGotErr && $date_2_stm <= $date_1_stm && strlen($date_2_stm) > 0) {
$bGotErr = true;
$lAdmin->AddUpdateError(GetMessage("VOTE_WRONG_FROM_TILL"));
}
}
if ($bGotErr) {
return false;
} else {
return true;
}
}
示例2: min
if ($signHeight && $signWidth) {
$ratio = min(37.5 / $signHeight, 150 / $signWidth);
$signHeight = $ratio * $signHeight;
$signWidth = $ratio * $signWidth;
$isAccSign = true;
}
}
if (CSalePaySystemAction::GetParamValue("SELLER_ACC")) {
$pdf->SetX($pdf->GetX() + $width / 2 + 15);
$pdf->Write(15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("SELLER_ACC")));
$pdf->Ln();
$pdf->Ln();
}
$pdf->SetX($pdf->GetX() + $width / 2 + 15);
$pdf->Write(15, CSalePdf::prepareToPdf('The Accountant '));
$pdf->Cell(0, 15, '', 'B');
if ($isAccSign) {
$pdf->Image(CSalePaySystemAction::GetParamValue('SELLER_ACC_SIGN'), $pdf->GetX() - 150, $pdf->GetY() - $signHeight + 15, $signWidth, $signHeight);
}
$pdf->Ln();
}
$dest = 'I';
if ($_REQUEST['GET_CONTENT'] == 'Y') {
$dest = 'S';
} else {
if ($_REQUEST['DOWNLOAD'] == 'Y') {
$dest = 'D';
}
}
return $pdf->Output(sprintf('Invoice # %s (Issue Date %s).pdf', $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ACCOUNT_NUMBER"], ConvertDateTime($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT"], 'YYYY-MM-DD')), $dest);
示例3: CheckFilter
function CheckFilter()
{
global $arFilterFields;
reset($arFilterFields);
foreach ($arFilterFields as $f) {
global ${$f};
}
$str = "";
$arMsg = array();
if (strlen(trim($find_date1)) > 0 || strlen(trim($find_date2)) > 0) {
$date_1_ok = false;
$date1_stm = MkDateTime(ConvertDateTime($find_date1, "D.M.Y"), "d.m.Y");
$date2_stm = MkDateTime(ConvertDateTime($find_date2, "D.M.Y") . " 23:59", "d.m.Y H:i");
if (!$date1_stm && strlen(trim($find_date1)) > 0) {
//$str.= GetMessage("SUP_WRONG_DATE_FROM")."<br>";
$arMsg[] = array("id" => "find_date1", "text" => GetMessage("SUP_WRONG_DATE_FROM"));
} else {
$date_1_ok = true;
}
if (!$date2_stm && strlen(trim($find_date2)) > 0) {
//$str.= GetMessage("SUP_WRONG_DATE_TILL")."<br>";
$arMsg[] = array("id" => "find_date2", "text" => GetMessage("SUP_WRONG_DATE_TILL"));
} elseif ($date_1_ok && $date2_stm <= $date1_stm && strlen($date2_stm) > 0) {
$arMsg[] = array("id" => "find_date2", "text" => GetMessage("SUP_FROM_TILL_DATE"));
}
//$str.= GetMessage("SUP_FROM_TILL_DATE")."<br>";
}
if (!empty($arMsg)) {
$e = new CAdminException($arMsg);
$GLOBALS["APPLICATION"]->ThrowException($e);
return false;
}
return true;
}
示例4: CleanUpTableByDate
function CleanUpTableByDate($cleanup_date, $table_name, $date_name)
{
$err_mess = "File: " . __FILE__ . "<br>Line: ";
$DB = CDatabase::GetModuleConnection('statistic');
if (strlen($cleanup_date) > 0) {
$stmp = MkDateTime(ConvertDateTime($cleanup_date, "D.M.Y"), "d.m.Y");
if ($stmp) {
$strSql = "DELETE FROM {$table_name} WHERE {$date_name}<FROM_UNIXTIME('{$stmp}')";
$DB->Query($strSql, false, $err_mess . __LINE__);
}
}
}
示例5: endSession
function endSession()
{
global $DB;
//Delete "expired" sessions
$expired = ConvertDateTime(ConvertTimeStamp(time() - 3600, 'FULL'), 'YYYY-MM-DD HH:MI:SS');
$rs = $DB->Query('select ID, SESS_ID, VALUE from ' . $this->_tempTableName . ' where PARENT_ID = -1 AND NAME = "SESS_ID" ORDER BY ID');
while ($ar = $rs->Fetch()) {
if ($ar['SESS_ID'] == $this->_sessionID || $ar['VALUE'] < $expired) {
$DB->Query('DELETE from ' . $this->_tempTableName . ' WHERE SESS_ID = "' . $DB->ForSQL($ar['SESS_ID']) . '"');
}
}
return true;
}
示例6: EndSession
public function EndSession()
{
global $DB;
//Delete "expired" sessions
$expired = ConvertDateTime(ConvertTimeStamp(time() - 3600, "FULL"), "YYYY-MM-DD HH:MI:SS");
$rs = $DB->Query("select ID, SESS_ID, VALUE from " . $this->_table_name . " where PARENT_ID = -1 AND NAME = 'SESS_ID' ORDER BY ID");
while ($ar = $rs->Fetch()) {
if ($ar["SESS_ID"] == $this->_sessid || $ar["VALUE"] < $expired) {
$DB->Query("DELETE from " . $this->_table_name . " WHERE SESS_ID = '" . $DB->ForSQL($ar["SESS_ID"]) . "'");
}
}
return true;
}
示例7: generateRow
/**
* Генерирует HTML для поля в списке
* @see AdminListHelper::addRowCell();
* @param CAdminListRow $row
* @param array $data - данные текущей строки
* @return mixed
*/
public function generateRow(&$row, $data)
{
if (isset($this->settings['EDIT_IN_LIST']) and $this->settings['EDIT_IN_LIST']) {
$row->AddCalendarField($this->getCode());
} else {
$arDate = ParseDateTime($this->getValue());
if ($arDate['YYYY'] < 10) {
$stDate = '-';
} else {
$stDate = ConvertDateTime($this->getValue(), "DD.MM.YYYY HH:MI:SS", "ru");
}
$row->AddViewField($this->getCode(), $stDate);
}
}
示例8: CheckFilter
function CheckFilter()
{
global $arFilterFields, $message, $lAdmin;
foreach ($arFilterFields as $s) {
global ${$s};
}
$bGotErr = false;
$find_date_start_1 = trim($find_date_start_1);
$find_date_start_2 = trim($find_date_start_2);
$find_date_end_1 = trim($find_date_end_1);
$find_date_end_2 = trim($find_date_end_2);
if (strlen($find_date_start_1) > 0 || strlen($find_date_start_2) > 0) {
// start date
$date_start_1_stm = MkDateTime(ConvertDateTime($find_date_start_1, "D.M.Y"), "d.m.Y");
$date_start_2_stm = MkDateTime(ConvertDateTime($find_date_start_2, "D.M.Y") . " 23:59:59", "d.m.Y H:i:s");
if (!$date_start_1_stm && strlen(trim($find_date_start_1)) > 0) {
$bGotErr = true;
$lAdmin->AddUpdateError(GetMessage("VOTE_WRONG_START_DATE_FROM"));
}
if (!$date_start_2_stm && strlen(trim($find_date_start_2)) > 0) {
$bGotErr = true;
$lAdmin->AddUpdateError(GetMessage("VOTE_WRONG_START_DATE_TILL"));
}
if (!$bGotErr && $date_start_2_stm <= $date_start_1_stm && strlen($date_start_2_stm) > 0) {
$bGotErr = true;
$lAdmin->AddUpdateError(GetMessage("VOTE_WRONG_START_FROM_TILL"));
}
}
if (strlen($find_date_end_1) > 0 || strlen($find_date_end_2) > 0) {
// end date
$date_end_1_stm = MkDateTime(ConvertDateTime($find_date_end_1, "D.M.Y"), "d.m.Y");
$date_end_2_stm = MkDateTime(ConvertDateTime($find_date_end_2, "D.M.Y") . " 23:59:59", "d.m.Y H:i:s");
if (!$date_end_1_stm && strlen(trim($find_date_end_1)) > 0) {
$bGotErr = true;
$lAdmin->AddUpdateError(GetMessage("VOTE_WRONG_END_DATE_FROM"));
}
if (!$date_end_2_stm && strlen(trim($find_date_end_2)) > 0) {
$bGotErr = true;
$lAdmin->AddUpdateError(GetMessage("VOTE_WRONG_END_DATE_TILL"));
}
if (!$bGotErr && $date_end_2_stm <= $date_end_1_stm && strlen($date_end_2_stm) > 0) {
$bGotErr = true;
$lAdmin->AddUpdateError(GetMessage("VOTE_WRONG_END_FROM_TILL"));
}
}
return $bGotErr ? false : true;
}
示例9: CheckFilter
function CheckFilter() // проверка введенных полей
{
global $strError, $FilterArr;
reset($FilterArr); foreach ($FilterArr as $f) global $$f;
$str = "";
$arMsg = Array();
if (strlen(trim($find_date1))>0 || strlen(trim($find_date2))>0)
{
$date_1_ok = false;
$date1_stm = MkDateTime(ConvertDateTime($find_date1,"D.M.Y"),"d.m.Y");
$date2_stm = MkDateTime(ConvertDateTime($find_date2,"D.M.Y")." 23:59","d.m.Y H:i");
if (!$date1_stm && strlen(trim($find_date1))>0)
//$str.= GetMessage("SUP_WRONG_DATE_FROM")."<br>";
$arMsg[] = array("id"=>"find_date1", "text"=> GetMessage("SUP_WRONG_DATE_FROM"));
else
$date_1_ok = true;
if (!$date2_stm && strlen(trim($find_date2))>0)
//$str.= GetMessage("SUP_WRONG_DATE_TILL")."<br>";
$arMsg[] = array("id"=>"find_date2", "text"=> GetMessage("SUP_WRONG_DATE_TILL"));
elseif ($date_1_ok && $date2_stm <= $date1_stm && strlen($date2_stm)>0)
//$str.= GetMessage("SUP_FROM_TILL_DATE")."<br>";
$arMsg[] = array("id"=>"find_date2", "text"=> GetMessage("SUP_FROM_TILL_DATE"));
}
if(!empty($arMsg))
{
$e = new CAdminException($arMsg);
$GLOBALS["APPLICATION"]->ThrowException($e);
return false;
}
return true;
}
示例10: CheckFilter
function CheckFilter($arFilter)
{
global $strError;
$str = "";
$find_date_modify_1 = $arFilter["DATE_MODIFY_1"];
$find_date_modify_2 = $arFilter["DATE_MODIFY_2"];
if (strlen(trim($find_date_modify_1)) > 0 || strlen(trim($find_date_modify_2)) > 0) {
$date_1_ok = false;
$date1_stm = MkDateTime(ConvertDateTime($find_date_modify_1, "D.M.Y"), "d.m.Y");
$date2_stm = MkDateTime(ConvertDateTime($find_date_modify_2, "D.M.Y") . " 23:59", "d.m.Y H:i");
if (!$date1_stm && strlen(trim($find_date_modify_1)) > 0) {
$str .= GetMessage("AD_ERROR_WRONG_DATE_MODIFY_FROM") . "<br>";
} else {
$date_1_ok = true;
}
if (!$date2_stm && strlen(trim($find_date_modify_2)) > 0) {
$str .= GetMessage("AD_ERROR_WRONG_DATE_MODIFY_TILL") . "<br>";
} elseif ($date_1_ok && $date2_stm <= $date1_stm && strlen($date2_stm) > 0) {
$str .= GetMessage("AD_ERROR_FROM_TILL_DATE_MODIFY") . "<br>";
}
}
$strError .= $str;
if (strlen($str) > 0) {
return false;
} else {
return true;
}
}
示例11: GetMessage
$arX1[] = GetMessage("STAT_WEEKDAY_1");
$arX1[] = GetMessage("STAT_WEEKDAY_2");
$arX1[] = GetMessage("STAT_WEEKDAY_3");
$arX1[] = GetMessage("STAT_WEEKDAY_4");
$arX1[] = GetMessage("STAT_WEEKDAY_5");
$arX1[] = GetMessage("STAT_WEEKDAY_6");
$arX = array(0, 1, 2, 3, 4, 5, 6);
}
//echo "<pre>";print_r($arResult);echo "</pre>";die();
foreach ($arResult as $k => $v) {
if ($arFind["filter_by"] == "week") {
$arX1[] = ConvertDateTime($k, "DD.MM");
} elseif ($arFind["filter_by"] == "month") {
$arX1[] = GetMessage("STAT_M_" . ConvertDateTime($k, "MM")) . " " . ConvertDateTime($k, "YYYY");
} elseif ($arFind["filter_by"] == "year") {
$arX1[] = ConvertDateTime($k, "YYYY");
}
if ($arFind["filter_by"] != "weekday") {
$arX[] = MakeTimeStamp($k);
}
if ($arFind["mode"] == "count") {
if ($arFind["find_all"] == "Y") {
$arY[] = IntVal($v["COUNT"]);
$arCountY[] = IntVal($v["COUNT"]);
}
if ($arFind["find_payed"] == "Y") {
$arY[] = IntVal($v["PAYED"]);
$arPayedY[] = IntVal($v["PAYED"]);
}
if ($arFind["find_allow_delivery"] == "Y") {
$arY[] = IntVal($v["ALLOW_DELIVERY"]);
示例12: Create
//.........这里部分代码省略.........
return false;
}
CTimeZone::Disable();
$this->GetURLs($site_id, $NS["ID"], $record_limit);
$bFileIsFull = false;
while (!$bFileIsFull && ($ar = $this->Fetch())) {
$record_limit--;
$NS["ID"] = $ar["ID"];
if (strlen($ar["URL"]) < 1) {
continue;
}
if ($bForumTopicsOnly && $ar["MODULE_ID"] == "forum") {
//Forum topic ID
$PARAM2 = intval($ar["PARAM2"]);
if ($NS["PARAM2"] < $PARAM2) {
$NS["PARAM2"] = $PARAM2;
$arTopic = CForumTopic::GetByIDEx($PARAM2);
if ($arTopic) {
$ar["FULL_DATE_CHANGE"] = $arTopic["LAST_POST_DATE"];
}
} else {
continue;
}
}
if ($bBlogNoComments && $ar["MODULE_ID"] == "blog") {
if (substr($ar["ITEM_ID"], 0, 1) === "C") {
continue;
}
}
if (preg_match("/^[a-z]+:\\/\\//", $ar["URL"])) {
$strURL = $ar["URL"];
} else {
$strURL = $strProto . $ar["SERVER_NAME"] . $ar["URL"];
}
$strURL = $this->LocationEncode($this->URLEncode($strURL, "UTF-8"));
$strTime = $this->TimeEncode(MakeTimeStamp(ConvertDateTime($ar["FULL_DATE_CHANGE"], "DD.MM.YYYY HH:MI:SS"), "DD.MM.YYYY HH:MI:SS"));
$strToWrite = "\t<url>\n\t\t<loc>" . $strURL . "</loc>\n\t\t<lastmod>" . $strTime . "</lastmod>\n\t</url>\n";
if (strlen($strURL) > 2048) {
fwrite($e, $strToWrite);
$NS["ERROR_CNT"]++;
} else {
fwrite($f, $strToWrite);
$NS["CNT"]++;
$NS["FILE_SIZE"] += strlen($strToWrite);
$NS["FILE_URL_CNT"]++;
}
//Next File on file size or url count limit
if ($NS["FILE_SIZE"] > 9000000 || $NS["FILE_URL_CNT"] >= 50000) {
$bFileIsFull = true;
} elseif ($end_of_execution) {
if (time() > $end_of_execution) {
fclose($e);
fclose($f);
CTimeZone::Enable();
return $NS;
}
}
}
CTimeZone::Enable();
if ($bFileIsFull) {
fwrite($e, "</urlset>\n");
fclose($e);
fwrite($f, "</urlset>\n");
fclose($f);
$NS["FILE_SIZE"] = 0;
$NS["FILE_URL_CNT"] = 0;
$NS["FILE_ID"]++;
return $NS;
} elseif ($record_limit <= 0) {
return $NS;
} else {
fwrite($e, "</urlset>\n");
fclose($e);
fwrite($f, "</urlset>\n");
fclose($f);
}
//WRITE INDEX FILE HERE
$f = fopen($arSite["ABS_DOC_ROOT"] . $arSite["DIR"] . "sitemap_index.xml", "w");
if (!$f) {
$this->m_error = GetMessage("SEARCH_ERROR_OPEN_FILE") . " " . $arSite["ABS_DOC_ROOT"] . $arSite["DIR"] . "sitemap_index.xml" . "<br>";
return false;
}
$strBegin = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<sitemapindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
fwrite($f, $strBegin);
for ($i = 0; $i <= $NS["FILE_ID"]; $i++) {
$strFile = $arSite["DIR"] . "sitemap_" . sprintf("%03d", $i) . ".xml";
$strTime = $this->TimeEncode(filemtime($arSite["ABS_DOC_ROOT"] . $strFile));
fwrite($f, "\t<sitemap>\n\t\t<loc>" . $this->URLEncode($strProto . $arSite["SERVER_NAME"] . $strFile, "UTF-8") . "</loc>\n\t\t<lastmod>" . $strTime . "</lastmod>\n\t</sitemap>\n");
}
fwrite($f, "</sitemapindex>\n");
fclose($f);
$this->m_errors_count = $NS["ERROR_CNT"];
$this->m_errors_href = $strProto . $arSite["SERVER_NAME"] . $arSite["DIR"] . "sitemap_errors.xml";
$this->m_href = $strProto . $arSite["SERVER_NAME"] . $arSite["DIR"] . "sitemap_index.xml";
return true;
} else {
$this->m_error = GetMessage("SEARCH_ERROR_SITE_ID") . "<br>";
return false;
}
}
示例13: GetList
//.........这里部分代码省略.........
*
* <h4>See Also</h4>
* <ul> <li> <a
* href="http://dev.1c-bitrix.ru/api_help/statistic/classes/cstateventtype/getdynamiclist.php">CStatEventType::GetDynamicList</a>
* </li> <li> <a
* href="http://dev.1c-bitrix.ru/api_help/statistic/classes/cstateventtype/getsimplelist.php">CStatEventType::GetSimpleList</a>
* </li> <li> <a href="http://dev.1c-bitrix.ru/api_help/statistic/terms.php#event_type">Термин "Тип
* события"</a> </li> </ul> </ht<a name="examples"></a>
*
*
* @static
* @link http://dev.1c-bitrix.ru/api_help/statistic/classes/cstateventtype/getlist.php
* @author Bitrix
*/
public static function GetList(&$by, &$order, $arFilter = array(), &$is_filtered, $LIMIT = false)
{
$err_mess = "File: " . __FILE__ . "<br>Line: ";
$DB = CDatabase::GetModuleConnection('statistic');
$find_group = $arFilter["GROUP"];
if ($find_group != "event1" && $find_group != "event2" && $find_group != "total") {
$find_group = "";
}
$arSqlSearch = array();
$arSqlSearch_h = array();
$strSqlSearch_h = "";
$filter_period = false;
$strSqlPeriod = "";
$strT = "";
$CURRENCY = "";
if (is_array($arFilter)) {
ResetFilterLogic();
$date1 = $arFilter["DATE1_PERIOD"];
$date2 = $arFilter["DATE2_PERIOD"];
$date_from = MkDateTime(ConvertDateTime($date1, "D.M.Y"), "d.m.Y");
$date_to = MkDateTime(ConvertDateTime($date2, "D.M.Y") . " 23:59", "d.m.Y H:i");
if (strlen($date1) > 0) {
$filter_period = true;
if (strlen($date2) > 0) {
$strSqlPeriod = "if(D.DATE_STAT<FROM_UNIXTIME('{$date_from}'),0, if(D.DATE_STAT>FROM_UNIXTIME('{$date_to}'),0,";
$strT = "))";
} else {
$strSqlPeriod = "if(D.DATE_STAT<FROM_UNIXTIME('{$date_from}'),0,";
$strT = ")";
}
} elseif (strlen($date2) > 0) {
$filter_period = true;
$strSqlPeriod = "if(D.DATE_STAT>FROM_UNIXTIME('{$date_to}'),0,";
$strT = ")";
}
foreach ($arFilter as $key => $val) {
if (is_array($val)) {
if (count($val) <= 0) {
continue;
}
} else {
if (strlen($val) <= 0 || $val === "NOT_REF") {
continue;
}
}
$match_value_set = array_key_exists($key . "_EXACT_MATCH", $arFilter);
$key = strtoupper($key);
switch ($key) {
case "ID":
$match = $arFilter[$key . "_EXACT_MATCH"] == "N" && $match_value_set ? "Y" : "N";
$arSqlSearch[] = GetFilterQuery("E." . $key, $val, $match);
break;
示例14: ConvertDateTime
</td>
</tr>
<tr align="right">
<td><b>Girada el: </b></td>
<td><?php
echo CSalePaySystemAction::GetParamValue("DATE_INSERT", false);
?>
</td>
</tr>
<?php
if (CSalePaySystemAction::GetParamValue("DATE_PAY_BEFORE", false)) {
?>
<tr align="right">
<td><b>Para pagarse el: </b></td>
<td><?php
echo ConvertDateTime(CSalePaySystemAction::GetParamValue("DATE_PAY_BEFORE", false), FORMAT_DATE) ?: CSalePaySystemAction::GetParamValue("DATE_PAY_BEFORE", false);
?>
</td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
</table>
<br>
<br>
<br>
示例15: foreach
}
$arResult["Post"]["textFormated"] = $p->convert($arPost["~DETAIL_TEXT"], false, $arImages, $arAllow, $arParserParams);
}
if (!empty($p->showedImages)) {
foreach ($p->showedImages as $val) {
if (!empty($arResult["images"][$val])) {
unset($arResult["images"][$val]);
}
}
}
$arResult["Post"]["DATE_PUBLISH_FORMATED"] = FormatDate($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($arResult["Post"]["DATE_PUBLISH"], CSite::GetDateFormat("FULL")));
$arResult["Post"]["DATE_PUBLISH_DATE"] = ConvertDateTime($arResult["Post"]["DATE_PUBLISH"], FORMAT_DATE);
$arResult["Post"]["DATE_PUBLISH_TIME"] = ConvertDateTime($arResult["Post"]["DATE_PUBLISH"], "HH:MI");
$arResult["Post"]["DATE_PUBLISH_D"] = ConvertDateTime($arResult["Post"]["DATE_PUBLISH"], "DD");
$arResult["Post"]["DATE_PUBLISH_M"] = ConvertDateTime($arResult["Post"]["DATE_PUBLISH"], "MM");
$arResult["Post"]["DATE_PUBLISH_Y"] = ConvertDateTime($arResult["Post"]["DATE_PUBLISH"], "YYYY");
$arResult["BlogUser"] = CBlogUser::GetByID($arPost["AUTHOR_ID"], BLOG_BY_USER_ID);
$arResult["BlogUser"] = CBlogTools::htmlspecialcharsExArray($arResult["BlogUser"]);
$dbUser = CUser::GetByID($arPost["AUTHOR_ID"]);
$arResult["arUser"] = $dbUser->GetNext();
$arResult["AuthorName"] = CBlogUser::GetUserName($arResult["BlogUser"]["ALIAS"], $arResult["arUser"]["NAME"], $arResult["arUser"]["LAST_NAME"], $arResult["arUser"]["LOGIN"]);
if ($arResult["PostPerm"] > BLOG_PERMS_MODERATE || $arResult["PostPerm"] >= BLOG_PERMS_PREMODERATE && $arPost["AUTHOR_ID"] == $arResult["USER_ID"]) {
$arResult["urlToEdit"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST_EDIT"], array("blog" => $arBlog["URL"], "post_id" => $arPost["ID"], "user_id" => $arParams["USER_ID"]));
}
if ($arResult["PostPerm"] >= BLOG_PERMS_MODERATE) {
$arResult["urlToHide"] = htmlspecialcharsex($APPLICATION->GetCurPageParam("hide=Y", array("del_id", "sessid", "success", "hide", "delete")));
}
if ($arResult["PostPerm"] >= BLOG_PERMS_FULL) {
$arResult["urlToDelete"] = htmlspecialcharsex($APPLICATION->GetCurPageParam("delete=Y", array("sessid", "delete", "hide")));
}
$arResult["BlogUser"]["AVATAR_file"] = CFile::GetFileArray($arResult["BlogUser"]["AVATAR"]);