function dateActiveFrom($date) { $arDateStart = explode(' ', $date); $arDateStart = explode('.', $arDateStart[0]); //[0]-d [1]-m [2]-Y $result = $arDateStart[0] . ' ' . FormatDate("F", MakeTimeStamp($date)) . ' ' . $arDateStart[2]; return $result; }
/** * Convert time in the nice view * * @param string $time Timestamp * @return string */ public static function formattedTime($time) { $dateDiff = date_diff(date_create('now'), date_create(FormatDate('Y-m-d', $time))); if ($dateDiff->days === 0) { $formattedTime = Loc::getMessage('ELEMENTARY_TODAY') . ', ' . date('H:i:s', $time); } elseif ($dateDiff->days === 1) { $formattedTime = Loc::getMessage('ELEMENTARY_YESTERDAY') . ', ' . date('H:i:s', $time); } else { $formattedTime = FormatDate('FULL', $time); } return $formattedTime; }
foreach ($arResult['ENTRIES'] as $arEntry) { $ts_start = MakeTimeStamp($arEntry['DATE_ACTIVE_FROM']); $ts_finish = MakeTimeStamp($arEntry['DATE_ACTIVE_TO']); $ts_now = time(); $bNow = $ts_now >= $ts_start && $ts_now <= $ts_finish; ?> <div class="bx-user-absence-entry<?php echo $bNow ? ' bx-user-absence-now' : ''; ?> "> <span class="bx-user-absence-entry-title"><?php echo htmlspecialcharsbx($arEntry['TITLE']); ?> </span> <span class="bx-user-absence-entry-date"><?php echo GetMessage('INTR_IAU_TPL' . ($bNow ? '_TO' : '_FROM')); ?> <?php echo FormatDate($DB->DateFormatToPHP(FORMAT_DATETIME), MakeTimeStamp($arEntry['DATE_ACTIVE' . ($bNow ? '_TO' : '_FROM')])); ?> </span> </div> <?php } ?> </div> </td> </tr> </table> <?php }
if ($arItem["IBLOCK_ID"] == $this->SKU_IBLOCK_ID) { if (!isset(${$FILTER_NAME}["OFFERS"])) { ${$FILTER_NAME}["OFFERS"] = array(); } ${$FILTER_NAME}["OFFERS"][$filterKey] = $filterValue; } else { ${$FILTER_NAME}[$filterKey] = $filterValue; } } } elseif ($arItem["USER_TYPE"] == "DateTime") { $datetimeFilters = array(); foreach ($arItem["VALUES"] as $key => $ar) { if ($ar["CHECKED"]) { $filterKey = "><PROPERTY_" . $PID; $timestamp = MakeTimeStamp($ar["VALUE"], FORMAT_DATE); $filterValue = array(FormatDate("Y-m-d H:i:s", $timestamp), FormatDate("Y-m-d H:i:s", $timestamp + 23 * 3600 + 59 * 60 + 59)); $datetimeFilters[] = array($filterKey => $filterValue); } } if ($datetimeFilters) { $datetimeFilters["LOGIC"] = "OR"; if ($arItem["IBLOCK_ID"] == $this->SKU_IBLOCK_ID) { if (!isset(${$FILTER_NAME}["OFFERS"])) { ${$FILTER_NAME}["OFFERS"] = array(); } ${$FILTER_NAME}["OFFERS"][] = $datetimeFilters; } else { ${$FILTER_NAME}[] = $datetimeFilters; } } } else {
function __SLEGetLogCommentRecord($arComments, $arParams, &$arAssets) { // for the same post log_update - time only, if not - date and time $timestamp = MakeTimeStamp(array_key_exists("LOG_DATE_FORMAT", $arComments) ? $arComments["LOG_DATE_FORMAT"] : $arComments["LOG_DATE"]); $timeFormated = FormatDateFromDB($arComments["LOG_DATE"], stripos($arParams["DATE_TIME_FORMAT"], 'a') || ($arParams["DATE_TIME_FORMAT"] == 'FULL' && IsAmPmMode()) !== false ? strpos(FORMAT_DATETIME, 'TT') !== false ? 'G:MI TT' : 'G:MI T' : 'HH:MI'); $dateTimeFormated = FormatDate(!empty($arParams['DATE_TIME_FORMAT']) ? $arParams['DATE_TIME_FORMAT'] == 'FULL' ? $GLOBALS['DB']->DateFormatToPHP(str_replace(':SS', '', FORMAT_DATETIME)) : $arParams['DATE_TIME_FORMAT'] : $GLOBALS['DB']->DateFormatToPHP(FORMAT_DATETIME), $timestamp); if (strcasecmp(LANGUAGE_ID, 'EN') !== 0 && strcasecmp(LANGUAGE_ID, 'DE') !== 0) { $dateTimeFormated = ToLower($dateTimeFormated); } // strip current year if (!empty($arParams['DATE_TIME_FORMAT']) && ($arParams['DATE_TIME_FORMAT'] == 'j F Y G:i' || $arParams['DATE_TIME_FORMAT'] == 'j F Y g:i a')) { $dateTimeFormated = ltrim($dateTimeFormated, '0'); $curYear = date('Y'); $dateTimeFormated = str_replace(array('-' . $curYear, '/' . $curYear, ' ' . $curYear, '.' . $curYear), '', $dateTimeFormated); } $path2Entity = $arComments["ENTITY_TYPE"] == SONET_ENTITY_GROUP ? CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_GROUP"], array("group_id" => $arComments["ENTITY_ID"])) : CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arComments["ENTITY_ID"])); if (intval($arComments["USER_ID"]) > 0) { $suffix = is_array($GLOBALS["arExtranetUserID"]) && in_array($arComments["USER_ID"], $GLOBALS["arExtranetUserID"]) ? GetMessage("SONET_LOG_EXTRANET_SUFFIX") : ""; $arTmpUser = array("NAME" => $arComments["~CREATED_BY_NAME"], "LAST_NAME" => $arComments["~CREATED_BY_LAST_NAME"], "SECOND_NAME" => $arComments["~CREATED_BY_SECOND_NAME"], "LOGIN" => $arComments["~CREATED_BY_LOGIN"]); $bUseLogin = $arParams["SHOW_LOGIN"] != "N" ? true : false; $arCreatedBy = array("FORMATTED" => CUser::FormatName($arParams["NAME_TEMPLATE"], $arTmpUser, $bUseLogin) . $suffix, "URL" => CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arComments["USER_ID"], "id" => $arComments["USER_ID"]))); $arCreatedBy["TOOLTIP_FIELDS"] = array("ID" => $arComments["USER_ID"], "NAME" => $arComments["~CREATED_BY_NAME"], "LAST_NAME" => $arComments["~CREATED_BY_LAST_NAME"], "SECOND_NAME" => $arComments["~CREATED_BY_SECOND_NAME"], "LOGIN" => $arComments["~CREATED_BY_LOGIN"], "USE_THUMBNAIL_LIST" => "N", "PATH_TO_SONET_MESSAGES_CHAT" => $arParams["PATH_TO_MESSAGES_CHAT"], "PATH_TO_SONET_USER_PROFILE" => $arParams["PATH_TO_USER"], "PATH_TO_VIDEO_CALL" => $arParams["PATH_TO_VIDEO_CALL"], "DATE_TIME_FORMAT" => $arParams["DATE_TIME_FORMAT"], "SHOW_YEAR" => $arParams["SHOW_YEAR"], "CACHE_TYPE" => $arParams["CACHE_TYPE"], "CACHE_TIME" => $arParams["CACHE_TIME"], "NAME_TEMPLATE" => $arParams["NAME_TEMPLATE"] . $suffix, "SHOW_LOGIN" => $arParams["SHOW_LOGIN"], "PATH_TO_CONPANY_DEPARTMENT" => $arParams["PATH_TO_CONPANY_DEPARTMENT"], "INLINE" => "Y"); } else { $arCreatedBy = array("FORMATTED" => GetMessage("SONET_C73_CREATED_BY_ANONYMOUS")); } $arTmpUser = array("NAME" => $arComments["~USER_NAME"], "LAST_NAME" => $arComments["~USER_LAST_NAME"], "SECOND_NAME" => $arComments["~USER_SECOND_NAME"], "LOGIN" => $arComments["~USER_LOGIN"]); $arParamsTmp = $arParams; $arParamsTmp["AVATAR_SIZE"] = isset($arParams["AVATAR_SIZE_COMMON"]) ? $arParams["AVATAR_SIZE_COMMON"] : $arParams["AVATAR_SIZE"]; $arTmpCommentEvent = array("EVENT" => $arComments, "LOG_DATE" => $arComments["LOG_DATE"], "LOG_DATE_TS" => MakeTimeStamp($arComments["LOG_DATE"]), "LOG_DATE_DAY" => ConvertTimeStamp(MakeTimeStamp($arComments["LOG_DATE"]), "SHORT"), "LOG_TIME_FORMAT" => $timeFormated, "LOG_DATETIME_FORMAT" => $dateTimeFormated, "TITLE_TEMPLATE" => "", "TITLE" => "", "TITLE_FORMAT" => "", "ENTITY_NAME" => $arComments["ENTITY_TYPE"] == SONET_ENTITY_GROUP ? $arComments["GROUP_NAME"] : CUser::FormatName($arParams['NAME_TEMPLATE'], $arTmpUser, $bUseLogin), "ENTITY_PATH" => $path2Entity, "CREATED_BY" => $arCreatedBy, "AVATAR_SRC" => CSocNetLogTools::FormatEvent_CreateAvatar($arComments, $arParamsTmp)); $arEvent = CSocNetLogTools::FindLogCommentEventByID($arComments["EVENT_ID"]); if ($arEvent && array_key_exists("CLASS_FORMAT", $arEvent) && array_key_exists("METHOD_FORMAT", $arEvent)) { $arLog = $arParams["USER_COMMENTS"] == "Y" ? array() : array("TITLE" => $arComments["~LOG_TITLE"], "URL" => $arComments["~LOG_URL"], "PARAMS" => $arComments["~LOG_PARAMS"]); $arFIELDS_FORMATTED = call_user_func(array($arEvent["CLASS_FORMAT"], $arEvent["METHOD_FORMAT"]), $arComments, $arParams, false, $arLog); if ($arParams["USE_COMMENTS"] != "Y") { if (array_key_exists("CREATED_BY", $arFIELDS_FORMATTED) && isset($arFIELDS_FORMATTED["CREATED_BY"]["TOOLTIP_FIELDS"])) { $arTmpCommentEvent["CREATED_BY"]["TOOLTIP_FIELDS"] = $arFIELDS_FORMATTED["CREATED_BY"]["TOOLTIP_FIELDS"]; } } } $message = $arFIELDS_FORMATTED && array_key_exists("EVENT_FORMATTED", $arFIELDS_FORMATTED) && array_key_exists("MESSAGE", $arFIELDS_FORMATTED["EVENT_FORMATTED"]) ? $arFIELDS_FORMATTED["EVENT_FORMATTED"]["MESSAGE"] : $arTmpCommentEvent["EVENT"]["MESSAGE"]; if (strlen($message) > 0) { $arFIELDS_FORMATTED["EVENT_FORMATTED"]["FULL_MESSAGE_CUT"] = CSocNetTextParser::closetags(htmlspecialcharsback($message)); } if (is_array($arTmpCommentEvent)) { $arFIELDS_FORMATTED["EVENT_FORMATTED"]["DATETIME"] = $arTmpCommentEvent["LOG_DATE_DAY"] == ConvertTimeStamp() ? $timeFormated : $dateTimeFormated; $arTmpCommentEvent["EVENT_FORMATTED"] = $arFIELDS_FORMATTED["EVENT_FORMATTED"]; if (isset($arComments["UF"]["UF_SONET_COM_URL_PRV"]) && !empty($arComments["UF"]["UF_SONET_COM_URL_PRV"]["VALUE"])) { $arCss = $GLOBALS["APPLICATION"]->sPath2css; $arJs = $GLOBALS["APPLICATION"]->arHeadScripts; ob_start(); $GLOBALS["APPLICATION"]->IncludeComponent("bitrix:system.field.view", $arComments["UF"]["UF_SONET_COM_URL_PRV"]["USER_TYPE_ID"], array("arUserField" => $arComments["UF"]["UF_SONET_COM_URL_PRV"], "arAddField" => array("NAME_TEMPLATE" => $arParams["NAME_TEMPLATE"], "PATH_TO_USER" => $arParams["~PATH_TO_USER"])), null, array("HIDE_ICONS" => "Y")); $urlPreviewText = ob_get_clean(); $arTmpCommentEvent["EVENT_FORMATTED"]["FULL_MESSAGE_CUT"] .= $urlPreviewText; $arAssets["CSS"] = array_merge($arAssets["CSS"], array_diff($GLOBALS["APPLICATION"]->sPath2css, $arCss)); $arAssets["JS"] = array_merge($arAssets["JS"], array_diff($GLOBALS["APPLICATION"]->arHeadScripts, $arJs)); unset($arComments["UF"]["UF_SONET_COM_URL_PRV"]); } $arTmpCommentEvent["UF"] = $arComments["UF"]; if (isset($arTmpCommentEvent["EVENT_FORMATTED"]) && is_array($arTmpCommentEvent["EVENT_FORMATTED"])) { $arFields2Cache = array("DATETIME", "MESSAGE", "FULL_MESSAGE_CUT", "ERROR_MSG"); foreach ($arTmpCommentEvent["EVENT_FORMATTED"] as $field => $value) { if (!in_array($field, $arFields2Cache)) { unset($arTmpCommentEvent["EVENT_FORMATTED"][$field]); } } } if (isset($arTmpCommentEvent["EVENT"]) && is_array($arTmpCommentEvent["EVENT"])) { if (!empty($arTmpCommentEvent["EVENT"]["URL"])) { $arTmpCommentEvent["EVENT"]["URL"] = str_replace("#GROUPS_PATH#", COption::GetOptionString("socialnetwork", "workgroups_page", "/workgroups/", SITE_ID), $arTmpCommentEvent["EVENT"]["URL"]); } $arFields2Cache = array("ID", "SOURCE_ID", "EVENT_ID", "USER_ID", "LOG_DATE", "RATING_TYPE_ID", "RATING_ENTITY_ID", "URL"); foreach ($arTmpCommentEvent["EVENT"] as $field => $value) { if (!in_array($field, $arFields2Cache)) { unset($arTmpCommentEvent["EVENT"][$field]); } } } if (isset($arTmpCommentEvent["CREATED_BY"]) && is_array($arTmpCommentEvent["CREATED_BY"])) { $arFields2Cache = array("TOOLTIP_FIELDS", "FORMATTED", "URL"); foreach ($arTmpCommentEvent["CREATED_BY"] as $field => $value) { if (!in_array($field, $arFields2Cache)) { unset($arTmpCommentEvent["CREATED_BY"][$field]); } } if (isset($arTmpCommentEvent["CREATED_BY"]["TOOLTIP_FIELDS"]) && is_array($arTmpCommentEvent["CREATED_BY"]["TOOLTIP_FIELDS"])) { $arFields2Cache = array("ID", "PATH_TO_SONET_USER_PROFILE", "NAME", "LAST_NAME", "SECOND_NAME", "LOGIN", "EMAIL"); foreach ($arTmpCommentEvent["CREATED_BY"]["TOOLTIP_FIELDS"] as $field => $value) { if (!in_array($field, $arFields2Cache)) { unset($arTmpCommentEvent["CREATED_BY"]["TOOLTIP_FIELDS"][$field]); } } } } } foreach ($arTmpCommentEvent["EVENT"] as $key => $value) { if (strpos($key, "~") === 0) { unset($arTmpCommentEvent["EVENT"][$key]); } } return $arTmpCommentEvent; }
$template->assign_block_vars('gallery', array('K' => $k, 'IMAGE' => $uploaded_path . session_id() . '/' . $v)); } } $iquantity = $atype == 2 || $buy_now_only == 'y' ? $iquantity : 1; if (!(strpos($a_starts, '-') === false)) { $a_starts = _mktime(substr($a_starts, 11, 2), substr($a_starts, 14, 2), substr($a_starts, 17, 2), substr($a_starts, 0, 2), substr($a_starts, 3, 2), substr($a_starts, 6, 4), 0); } $shippingtext = ''; if ($shipping == 1) { $shippingtext = $MSG['033']; } elseif ($shipping == 2) { $shippingtext = $MSG['032']; } elseif ($shipping == 3) { $shippingtext = $MSG['867']; } $template->assign_vars(array('TITLE' => $title, 'SUBTITLE' => $subtitle, 'ERROR' => $ERR == 'ERR_' ? '' : ${$ERR}, 'PAGE' => 2, 'MINTEXT' => $atype == 2 ? $MSG['038'] : $MSG['020'], 'AUC_DESCRIPTION' => stripslashes($sdescription), 'PIC_URL' => empty($pict_url) ? $MSG['114'] : '<img src="' . $uploaded_path . session_id() . '/' . $pict_url . '" style="max-width:100%; max-height:100%;">', 'MIN_BID' => $system->print_money($minimum_bid, false), 'RESERVE' => $system->print_money($reserve_price, false), 'BN_PRICE' => $system->print_money($buy_now_price, false), 'SHIPPING_COST' => $system->print_money($shipping_cost, false), 'ADDITIONAL_SHIPPING_COST' => $system->print_money($additional_shipping_cost, false), 'STARTDATE' => empty($start_now) ? FormatDate($a_starts) : FormatDate($system->ctime), 'DURATION' => $duration_desc, 'INCREMENTS' => $increments == 1 ? $MSG['614'] : $system->print_money($customincrement, false), 'ATYPE' => $system->SETTINGS['auction_types'][$atype], 'ATYPE_PLAIN' => $atype, 'SHIPPING' => $shippingtext, 'INTERNATIONAL' => $international ? $MSG['033'] : $MSG['043'], 'SHIPPING_TERMS' => nl2br(stripslashes($shipping_terms)), 'PAYMENTS_METHODS' => $payment_methods, 'CAT_LIST1' => $category_string1, 'CAT_LIST2' => $category_string2, 'FEE' => number_format(get_fee($minimum_bid), $system->SETTINGS['moneydecimals']), 'B_USERAUTH' => $system->SETTINGS['usersauth'] == 'y', 'B_BN_ONLY' => !($system->SETTINGS['buy_now'] == 2 && $buy_now_only == 'y'), 'B_BN' => $system->SETTINGS['buy_now'] == 2, 'B_GALLERY' => $system->SETTINGS['picturesgallery'] == 1 && isset($_SESSION['UPLOADED_PICTURES']) && count($_SESSION['UPLOADED_PICTURES']) > 0, 'B_CUSINC' => $system->SETTINGS['cust_increment'] == 1, 'B_FEES' => $system->SETTINGS['fees'] == 'y', 'B_SHIPPING' => $system->SETTINGS['shipping'] == 1, 'B_SUBTITLE' => $system->SETTINGS['subtitle'] == 'y')); break; } case 1: // enter auction details // check time format is timestamp. If not change to timestamp if (!(strpos($a_starts, '-') === false)) { $a_starts = _mktime(substr($a_starts, 11, 2), substr($a_starts, 14, 2), substr($a_starts, 17, 2), substr($a_starts, 0, 2), substr($a_starts, 3, 2), substr($a_starts, 6, 4), 0); } $category_string1 = get_category_string($sellcat1); $category_string2 = get_category_string($sellcat2); // auction types $TPL_auction_type = '<select name="atype" id="atype">' . "\n"; foreach ($system->SETTINGS['auction_types'] as $key => $val) { $TPL_auction_type .= "\t" . '<option value="' . $key . '" ' . ($key == $atype ? 'selected="true"' : '') . '>' . $val . '</option>' . "\n"; }
$high_bids = $j > 0 ? true : false; // Build list of help topics $query = "SELECT id, category FROM " . $DBPrefix . "faqscat_translated WHERE lang = '" . $language . "' ORDER BY category ASC"; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); $i = 0; while ($faqscat = mysql_fetch_array($res)) { $template->assign_block_vars('helpbox', array('ID' => $faqscat['id'], 'TITLE' => $faqscat['category'])); $i++; } $helpbox = $i > 0 ? true : false; // -- Build news list if ($system->SETTINGS['newsbox'] == 1) { $query = "SELECT n.title As t, n.new_date, t.* FROM " . $DBPrefix . "news n\r\n\t\t\tLEFT JOIN " . $DBPrefix . "news_translated t ON (t.id = n.id)\r\n\t\t\tWHERE t.lang = '" . $language . "' AND n.suspended = 0\r\n\t\t\tORDER BY new_date DESC, id DESC LIMIT " . $system->SETTINGS['newstoshow']; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); while ($new = mysql_fetch_array($res)) { if (!empty($new['title'])) { $title = stripslashes($new['title']); } else { $title = stripslashes($new['t']); } $template->assign_block_vars('newsbox', array('ID' => $new['id'], 'DATE' => FormatDate($new['new_date']), 'TITLE' => $title)); } } $template->assign_vars(array('FLAGS' => ShowFlags(), 'LOGIN_ERROR' => isset($_SESSION['loginerror']) ? $_SESSION['loginerror'] : '', 'B_AUC_LAST' => $auc_last, 'B_HIGH_BIDS' => $high_bids, 'B_AUC_ENDSOON' => $end_soon, 'B_HELPBOX' => $helpbox, 'B_MULT_LANGS' => count($LANGUAGES) > 1, 'B_LOGIN_BOX' => $system->SETTINGS['loginbox'] == 1, 'B_LOGIN_ERROR' => isset($_SESSION['loginerror']), 'B_NEWS_BOX' => $system->SETTINGS['newsbox'] == 1)); require 'header.php'; $template->set_filenames(array('body' => 'home.html')); $template->display('body'); require 'footer.php'; unset($_SESSION['loginerror']);
if (!$user->logged_in) { $_SESSION['REDIRECT_AFTER_LOGIN'] = '******'; header('location: user_login.php'); exit; } // the user has received the item if (isset($_GET['shipped'])) { $query = "UPDATE " . $DBPrefix . "winners SET shipped = 2 WHERE id = :get_shipped AND winner = :user_id"; $params[] = array(':get_shipped', $_GET['shipped'], 'int'); $params[] = array(':user_id', $user->user_data['id'], 'int'); $db->query($query, $params); } // Get closed auctions with winners $query = "SELECT DISTINCT a.id, a.qty, a.seller, a.paid, a.feedback_win, a.bid, a.auction, a.shipped, b.title, b.ends, b.shipping_cost, b.shipping, u.nick, u.email\n\t\tFROM " . $DBPrefix . "winners a\n\t\tLEFT JOIN " . $DBPrefix . "auctions b ON (a.auction = b.id)\n\t\tLEFT JOIN " . $DBPrefix . "users u ON (u.id = a.seller)\n\t\tWHERE (b.closed = 1 OR b.bn_only = 'y') AND b.suspended = 0\n\t\tAND a.winner = :user_id ORDER BY a.closingdate DESC"; $params = array(); $params[] = array(':user_id', $user->user_data['id'], 'int'); $db->query($query, $params); $sslurl = $system->SETTINGS['usersauth'] == 'y' && $system->SETTINGS['https'] == 'y' ? str_replace('http://', 'https://', $system->SETTINGS['siteurl']) : $system->SETTINGS['siteurl']; $sslurl = $system->SETTINGS['usersauth'] == 'y' && !empty($system->SETTINGS['https_url']) ? $system->SETTINGS['https_url'] : $sslurl; while ($row = $db->fetch()) { $totalcost = $row['qty'] > 1 ? $row['bid'] * $row['qty'] : $row['bid']; $additional_shipping = $data['additional_shipping_cost'] * ($data['qty'] - 1); $totalcost = $row['shipping'] == 2 ? $totalcost : $totalcost + $row['shipping_cost'] + $additional_shipping; $template->assign_block_vars('items', array('AUC_ID' => $row['auction'], 'TITLE' => $system->uncleanvars($row['title']), 'ID' => $row['id'], 'ENDS' => FormatDate($row['ends']), 'BID' => $row['bid'], 'FBID' => $system->print_money($row['bid']), 'QTY' => $row['qty'] > 0 ? $row['qty'] : 1, 'TOTAL' => $system->print_money($totalcost), 'B_PAID' => $row['paid'] == 1, 'SHIPPED' => $row['shipped'], 'SELLNICK' => $row['nick'], 'SELLEMAIL' => $row['email'], 'FB_LINK' => $row['feedback_win'] == 0 ? '<a href="' . $sslurl . 'feedback.php?auction_id=' . $row['auction'] . '&wid=' . $user->user_data['id'] . '&sid=' . $row['seller'] . '&ws=w">' . $MSG['207'] . '</a>' : '')); } include 'header.php'; $TMP_usmenutitle = $MSG['454']; include $include_path . 'user_cp.php'; $template->set_filenames(array('body' => 'buying.tpl')); $template->display('body'); include 'footer.php';
if (isset($arResult['USER_GROUPS'])) { foreach ($arResult['USER_GROUPS'] as $groupID => $arGroup) { if (intval($arGroup['SECTION_ID']) > 0) { $typeItems .= str_replace(array("#GROUP_ID#", "#GROUP_NAME#", "#LINK#", "#SECTION_ID#"), array(intval($groupID), CUtil::JSEscape($arGroup['GROUP_NAME']), CUtil::JSEscape($arGroup['PATH_FILES']), intval($arGroup['SECTION_ID'])), "'SG#GROUP_ID#' : {'id' : 'SG#GROUP_ID#', 'name' : '#GROUP_NAME#', 'type' : 'socnet', 'link' : '#LINK#', 'section_id': '#SECTION_ID#'},\n"); } } } $typeItems .= "}"; $disabledItems = array(); $items = "{\n"; foreach ($arResult["GRID_DATA"] as $row) { if (!isset($row['data']['NAME'])) { continue; } $timeStampXUnix = $row['data']['TIMESTAMP_X_UNIX']; $timeStampXUnixD = FormatDate('X', $timeStampXUnix); if ($timeStampXUnix == null) { $timeStampXUnix = MakeTimeStamp($row['data']['TIMESTAMP_X']); $timeStampXUnixD = GetTime($timeStampXUnix, "SHORT"); } //element if WF_NEW = 'Y' and WF_STATUS_ID = 2 - not public if ($row['data']['TYPE'] === "E" && $row['data']['WF_STATUS_ID'] != 1) { $disabledItems[$row['id']] = array('hint' => GetMessageJS('WD_DESCR_DISABLE_ATTACH_NON_PUBLIC_FILE')); } $data = array("#ID#" => $row['id'], "#TYPE#" => $row['data']['FTYPE'], "#NAME#" => CUtil::JSEscape($row['data']['NAME']), "#PATH#" => CUtil::JSEscape($row['data']['PATH']), "#LINK#" => CUtil::JSEscape($row['data']['TYPE'] === "S" ? $row['data']['URL']['THIS'] : $row['data']['URL']['EDIT']), "#SIZE_FORMATTED#" => isset($row['data']['FILE_SIZE']) ? $row['data']['FILE_SIZE'] : '', "#SIZE#" => isset($row['data']['FILE']['FILE_SIZE']) ? intval($row['data']['FILE']['FILE_SIZE']) : 0, "#MODIFIED_BY#" => CUtil::JSEscape($row['data']['MODIFIED_BY']['FULL_NAME']), "#MODIFIED_DATE_FORMATTED#" => $timeStampXUnixD, "#MODIFIED_DATE#" => $timeStampXUnix); $items .= str_replace(array_keys($data), array_values($data), "'#ID#' : {'id' : '#ID#', 'type': '#TYPE#', 'link': '#LINK#', 'name': '#NAME#', 'path': '#PATH#', 'size': '#SIZE_FORMATTED#', 'sizeInt': '#SIZE#', 'modifyBy': '#MODIFIED_BY#', 'modifyDate': '#MODIFIED_DATE_FORMATTED#', 'modifyDateInt': '#MODIFIED_DATE#'},\n"); } $items .= "}"; if (isset($_REQUEST['WD_LOAD_ITEMS'])) { ?> {
$base = CCurrency::GetBaseCurrency(); $r = CSaleOrder::GetList(array(), array(">=DATE_INSERT" => ConvertTimeStamp(time() - $monitoring->getInterval() * 24 * 3400, "SHORT")), array("LID", "CURRENCY", "SUM" => "PRICE")); while ($a = $r->fetch()) { $sum += CCurrencyRates::ConvertCurrency($a["PRICE"], $a["CURRENCY"], $base); } $sum *= 1 - $uptimeRate; if ($sum <= 0.0) { $sumHtml = number_format((1 - $uptimeRate) * 100, 2, '.', ' ') . "%"; $alertIntervalText = $intervalLang["uptime"][$monitoring->getInterval()]; } else { $sumHtml = CurrencyFormat($sum, $base); $alertIntervalText = $intervalLang["sale"][$monitoring->getInterval()]; } } elseif ($testCount === 1 && HasMessage("GD_BITRIXCLOUD_MONITOR_" . strtoupper($testAlert->getName()))) { $uptimeRate = 1; $resultText = FormatDate("ddiff", time(), $testAlert->getResult()); $sumHtml = GetMessage("GD_BITRIXCLOUD_MONITOR_" . strtoupper($testAlert->getName()), array("#DOMAIN#" => $converter->Decode($testDomain), "#DAYS#" => $resultText)); } elseif ($uptimeRate < 1) { $sumHtml = number_format((1 - $uptimeRate) * 100, 2, '.', ' ') . "%"; $alertIntervalText = $intervalLang["uptime"][$monitoring->getInterval()]; } else { $sumHtml = GetMessage("GD_BITRIXCLOUD_MONITOR_PROBLEMS", array("#COUNT#" => $testCount)); } } ?> <div class="bx-gadgets-content-layout-inspector"> <div class="bx-gadgets-title"><?php echo GetMessage("GD_BITRIXCLOUD_MONITOR"); ?> </div> <div class="bx-gadget-bottom-cont bx-gadget-bottom-button-cont bx-gadget-mark-cont">
break; case 'WORK_LOGO': if (IntVal($val) > 0) { $iSize = 150; $arImage = CSocNetTools::InitImage($val, $iSize, "/bitrix/images/1.gif", 1, "", false); $val = $arImage["IMG"]; } break; case 'TIME_ZONE': if ($arResult["User"]["AUTO_TIME_ZONE"] != "N") { continue 2; } break; case 'LAST_LOGIN': if (StrLen($val) > 0) { $val = FormatDate($DB->DateFormatToPHP(FORMAT_DATETIME), MakeTimeStamp($val, FORMAT_DATETIME)); } break; default: if (in_array($userFieldName, $arParams["SONET_USER_FIELDS_SEARCHABLE"])) { $strSearch = $arParams["PATH_TO_SEARCH_INNER"] . (StrPos($arParams["PATH_TO_SEARCH_INNER"], "?") !== false ? "&" : "?") . "flt_" . StrToLower($userFieldName) . "=" . UrlEncode($val); } break; } if (in_array($userFieldName, $arParams["USER_FIELDS_MAIN"])) { $arResult["UserFieldsMain"]["DATA"][$userFieldName] = array("NAME" => GetMessage("SONET_UP1_" . $userFieldName), "VALUE" => $val, "SEARCH" => $strSearch); } if (in_array($userFieldName, $arParams["USER_FIELDS_CONTACT"])) { $arResult["UserFieldsContact"]["DATA"][$userFieldName] = array("NAME" => GetMessage("SONET_UP1_" . $userFieldName), "VALUE" => $val, "SEARCH" => $strSearch); } if (in_array($userFieldName, $arParams["USER_FIELDS_PERSONAL"])) {
function FormatBirthDate($per_BirthYear, $per_BirthMonth, $per_BirthDay, $sSeparator = "-", $bFlags) { if ($bFlags == 1 || $per_BirthYear == "") { $birthYear = "1000"; } else { $birthYear = $per_BirthYear; } if ($per_BirthMonth > 0 && $per_BirthDay > 0) { if ($per_BirthMonth < 10) { $dBirthMonth = "0" . $per_BirthMonth; } else { $dBirthMonth = $per_BirthMonth; } if ($per_BirthDay < 10) { $dBirthDay = "0" . $per_BirthDay; } else { $dBirthDay = $per_BirthDay; } $dBirthDate = $dBirthMonth . $sSeparator . $dBirthDay; if (is_numeric($birthYear)) { $dBirthDate = $birthYear . $sSeparator . $dBirthDate; if (checkdate($dBirthMonth, $dBirthDay, $birthYear)) { $dBirthDate = FormatDate($dBirthDate); if (substr($dBirthDate, -6, 6) == ", 1000") { $dBirthDate = str_replace(", 1000", "", $dBirthDate); } } } } elseif (is_numeric($birthYear) && $birthYear != 1000) { $dBirthDate = $birthYear; } else { $dBirthDate = ""; } return $dBirthDate; }
include '../../../config.php'; include '../../core.php'; include '../../..' . $setting['template_url'] . '/template_settings.php'; $the_comment = mysql_secure($_POST['comment'], 0); $id = intval($_POST['id']); if (isset($_COOKIE["ava_username"])) { $cookie_id = intval($_COOKIE["ava_userid"]); $code = preg_replace("/[^a-z,A-Z,0-9]/", "", $_COOKIE['ava_code']); $last_comment = mysql_query("SELECT last_comment FROM ava_users WHERE id = {$cookie_id} AND last_comment > NOW() - INTERVAL 1 MINUTE"); if (mysql_num_rows($last_comment) == '0') { $user = mysql_query("SELECT * FROM ava_users WHERE id=" . $cookie_id . ""); $user2 = mysql_fetch_array($user); if ($user2['password'] == $code && $user2['banned'] == 0) { $date = date("Y-m-d H:i:s"); mysql_query("INSERT INTO ava_news_comments (user, comment, link_id, date, ip) VALUES ('{$cookie_id}', '{$the_comment}', '{$id}', '{$date}', '{$_SERVER['REMOTE_ADDR']}')"); $comment = array('username' => $user2['username'], 'content' => stripslashes(nl2br(htmlspecialchars($_POST['comment']))), 'user_points' => $user2['points'], 'date' => FormatDate($date, 'time')); $comment['delete'] = ''; $comment['report_button'] = ''; $comment['user_url'] = ProfileUrl($user2['id'], $user2['seo_url']); if ($user2['avatar'] == '') { if ($user2['facebook'] == 1) { $comment['avatar_url'] = 'http://graph.facebook.com/' . $user2['facebook_id'] . '/picture'; } else { $comment['avatar_url'] = $setting['site_url'] . '/uploads/avatars/default.png'; } } else { $comment['avatar_url'] = $setting['site_url'] . '/uploads/avatars/' . $user2['avatar']; } echo '<a name="1"></a>'; include '../../..' . $setting['template_url'] . '/' . $template['news_comment']; mysql_query("UPDATE ava_users SET comments = comments + 1, points = points + {$setting['points_comment']}, last_comment = '{$date}' WHERE id='" . $cookie_id . "'") or die(mysql_error());
<?php } ?> <?php break; case "U": //CALENDAR ?> <div class="bx_filter_parameters_box_container_block"><div class="bx_filter_input_container bx_filter_calendar_container"> <?php $APPLICATION->IncludeComponent('bitrix:main.calendar', '', array('FORM_NAME' => $arResult["FILTER_NAME"] . "_form", 'SHOW_INPUT' => 'Y', 'INPUT_ADDITIONAL_ATTR' => 'class="calendar" placeholder="' . FormatDate("SHORT", $arItem["VALUES"]["MIN"]["VALUE"]) . '" onkeyup="smartFilter.keyup(this)" onchange="smartFilter.keyup(this)"', 'INPUT_NAME' => $arItem["VALUES"]["MIN"]["CONTROL_NAME"], 'INPUT_VALUE' => $arItem["VALUES"]["MIN"]["HTML_VALUE"], 'SHOW_TIME' => 'N', 'HIDE_TIMEBAR' => 'Y'), null, array('HIDE_ICONS' => 'Y')); ?> </div></div> <div class="bx_filter_parameters_box_container_block"><div class="bx_filter_input_container bx_filter_calendar_container"> <?php $APPLICATION->IncludeComponent('bitrix:main.calendar', '', array('FORM_NAME' => $arResult["FILTER_NAME"] . "_form", 'SHOW_INPUT' => 'Y', 'INPUT_ADDITIONAL_ATTR' => 'class="calendar" placeholder="' . FormatDate("SHORT", $arItem["VALUES"]["MAX"]["VALUE"]) . '" onkeyup="smartFilter.keyup(this)" onchange="smartFilter.keyup(this)"', 'INPUT_NAME' => $arItem["VALUES"]["MAX"]["CONTROL_NAME"], 'INPUT_VALUE' => $arItem["VALUES"]["MAX"]["HTML_VALUE"], 'SHOW_TIME' => 'N', 'HIDE_TIMEBAR' => 'Y'), null, array('HIDE_ICONS' => 'Y')); ?> </div></div> <?php break; default: //CHECKBOXES ?> <?php foreach ($arItem["VALUES"] as $val => $ar) { ?> <label data-role="label_<?php echo $ar["CONTROL_ID"]; ?> " class="bx_filter_param_label <?php echo $ar["DISABLED"] ? 'disabled' : '';
$sql = $sql . " LIMIT $startplayers, $finishplayers"; } $result = mysql_query($sql); $num = mysql_num_rows($result); $cur = 1; while ($num >= $cur) { $row = mysql_fetch_array($result); $name = $row["name"]; $approved = $row["approved"]; $id = $row['player_id']; $nameClass = colorNameClass($name, $approved); $alias = $row["alias"]; $forum = $row["forum"]; $versions = $row["versions"]; $joined = FormatDate($row["joindate"]); if ($forum == "[none]") { $forum = ""; } $mail = $row["mail"]; if ($mail == "n/a" || empty($mail)) { $mailaddress = "n/a"; $mailpic = ""; } else { $mailaddress = " <a href='mailto:$mail'> <font color='$color1'> mail
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } if ($arResult['PROPERTIES']['START_DATA']['VALUE']) { $arDataInfo = explode(' ', $arResult['PROPERTIES']['START_DATA']['VALUE']); if ($arDataInfo[0] != '') { $startDataSTAMP = MakeTimeStamp($arDataInfo[0], "DD.MM.YYYY"); $arResult['DATA_PRINT'] = FormatDate("d M Y", $startDataSTAMP); } if ($arDataInfo[1] != '') { $arTime = explode(':', $arDataInfo[1]); $arResult['TIME'] = $arTime[0] . ':' . $arTime[1]; } $startSTAMP = MakeTimeStamp($arResult['PROPERTIES']['START_DATA']['VALUE'], "DD.MM.YYYY HH:MI:SS"); $now = time(); if ($startSTAMP >= $now) { $arResult['ACTIVE_REG'] = 'Y'; } else { $arResult['ACTIVE_REG'] = 'N'; } } if ($arResult['SHOW_COUNTER'] == '') { $arResult['SHOW_COUNTER'] = '0'; } if ($arResult['PROPERTIES']['FORUM_MESSAGE_CNT']['VALUE'] == '') { $arResult['PROPERTIES']['FORUM_MESSAGE_CNT']['VALUE'] = '0'; } if ($arResult['PROPERTIES']['LIKE_QUANTITY']['VALUE'] == '') { $arResult['PROPERTIES']['LIKE_QUANTITY']['VALUE'] = '0';
/** * @param string $format * @param int $timestamp * @return string */ public static function DateFormat($format, $timestamp) { global $DB; switch($format) { case "SHORT": return FormatDate($DB->dateFormatToPHP(FORMAT_DATE), $timestamp); case "FULL": return FormatDate($DB->dateFormatToPHP(FORMAT_DATETIME), $timestamp); default: return FormatDate($format, $timestamp); } }
$arFilter[">LAST_POST_ID"] = 0; } $dbBlog = CBlog::GetList($SORT, $arFilter, false, array("nPageSize" => $arParams["BLOG_COUNT"], "bShowAll" => false), $arSelectFields); $arResult["NAV_STRING"] = $dbBlog->GetPageNavString(GetMessage("B_B_GR_TITLE"), $arParams["NAV_TEMPLATE"], false, $component); $arResult["BLOG"] = array(); while ($arBlog = $dbBlog->GetNext()) { $arBlog["urlToPost"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST"], array("blog" => $arBlog["URL"], "post_id" => $arBlog["LAST_POST_ID"], "user_id" => $arBlog["OWNER_ID"])); $arBlog["urlToBlog"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG"], array("blog" => $arBlog["URL"], "user_id" => $arBlog["OWNER_ID"])); $arBlog["urlToAuthor"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arBlog["OWNER_ID"])); $arBlog["AuthorName"] = CBlogUser::GetUserName($arBlog["BLOG_USER_ALIAS"], $arBlog["OWNER_NAME"], $arBlog["OWNER_LAST_NAME"], $arBlog["OWNER_LOGIN"]); $arBlog["BLOG_USER_AVATAR_ARRAY"] = CFile::GetFileArray($arBlog["BLOG_USER_AVATAR"]); if ($arBlog["BLOG_USER_AVATAR_ARRAY"] !== false) { $arBlog["Avatar_resized"] = CFile::ResizeImageGet($arBlog["BLOG_USER_AVATAR_ARRAY"], array("width" => 100, "height" => 100), BX_RESIZE_IMAGE_EXACT, false); $arBlog["BLOG_USER_AVATAR_IMG"] = CFile::ShowImage($arBlog["Avatar_resized"]["src"], 100, 100, 'align="right"'); } $arBlog["LAST_POST_DATE_FORMATED"] = FormatDate($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($arBlog["LAST_POST_DATE"], CSite::GetDateFormat("FULL"))); $arResult["BLOG"][] = $arBlog; } if ($arParams["CACHE_TIME"] > 0) { $cache->EndDataCache(array("templateCachedData" => $this->GetTemplateCachedData(), "arResult" => $arResult)); } } } else { $arResult["FATAL_ERROR"] = GetMessage("B_B_GR_NO_GROUP"); CHTTP::SetStatus("404 Not Found"); } } else { $arResult["FATAL_ERROR"] = GetMessage("B_B_GR_NO_GROUP"); CHTTP::SetStatus("404 Not Found"); } $this->IncludeComponentTemplate();
echo ' style="display:none;"'; } ?> >Вы уже участвуете в конкурсе</button> </div> <div class="clear"></div> <div class="info-block"> <div class="info-block-head">Даты проведения</div> <div class="info-block-text"> <?php if (FormatDate(array("d" => 'F'), MakeTimeStamp($arEvent["PROPERTIES"]["START_DATE"]["VALUE"], "DD.MM.YYYY HH:MI:SS")) == FormatDate(array("d" => 'F'), MakeTimeStamp($arEvent["PROPERTIES"]["END_DATE"]["VALUE"], "DD.MM.YYYY HH:MI:SS"))) { echo FormatDate(array("d" => 'j - '), MakeTimeStamp($arEvent["PROPERTIES"]["START_DATE"]["VALUE"], "DD.MM.YYYY HH:MI:SS")); } else { echo FormatDate(array("d" => 'j F - '), MakeTimeStamp($arEvent["PROPERTIES"]["START_DATE"]["VALUE"], "DD.MM.YYYY HH:MI:SS")); } echo FormatDate(array("d" => 'j F'), MakeTimeStamp($arEvent["PROPERTIES"]["END_DATE"]["VALUE"], "DD.MM.YYYY HH:MI:SS")); ?> <?php echo " " . date('Y', MakeTimeStamp($arEvent["PROPERTIES"]["END_DATE"]["VALUE"], "DD.MM.YYYY HH:MI:SS")); ?> </div> </div> <div class="info-block"> <div class="info-block-head">Описание конкурса:</div> <div class="info-block-text"><?php echo $arEvent["PREVIEW_TEXT"]; ?> <br> *подробнее об условиях участия в конкурсе читайте <a title="Подробно о конкурсе" href="#" onclick="openPopup_page('contest_info')">здесь</a> <div class="privacy-window contest_info" style="display:none;">
/** * Shows information about CDN free space in Admin's informer popup * * @return void */ public function OnAdminInformerInsertItems() { $CDNAIParams = array("TITLE" => GetMessage("BCL_BACKUP_AI_TITLE"), "COLOR" => "peach"); $backup = self::getInstance(); $backup->loadFromOptions(); $last_request_time_option = CBitrixCloudOption::getOption("backup_last_backup_time"); try { if ($backup->getQuota() <= 0 && $last_request_time_option->getIntegerValue() <= 0) { $backup->_getInformation(true); $backup->saveToOptions(); $last_request_time_option->setStringValue((string) time()); } } catch (CBitrixCloudException $e) { ///TODO show error to user return; } if ($backup->getQuota() <= 0) { return; } $arFiles = $backup->listFiles(); if (empty($arFiles)) { $PROGRESS_FREE = 100; $AVAIL = $backup->getQuota(); $ALLOWED = CFile::FormatSize($backup->getQuota(), 0); $CDNAIParams["ALERT"] = true; $MESS = '<span class="adm-informer-strong-text">' . GetMessage("BCL_BACKUP_AI_NO_FILES") . '</span>'; $CDNAIParams["FOOTER"] = '<a href="/bitrix/admin/dump.php?lang=' . LANGUAGE_ID . '">' . GetMessage("BCL_BACKUP_AI_DO_BACKUP_STRONGLY") . '</a>'; } elseif ($backup->getLastTimeBackup() < time() - 7 * 24 * 3600) { $AVAIL = $backup->getQuota() - $backup->getUsage(); if ($AVAIL < 0.0) { $AVAIL = 0.0; } $PROGRESS_FREE = round($AVAIL / $backup->getQuota() * 100); $ALLOWED = CFile::FormatSize($backup->getQuota(), 0); $CDNAIParams["ALERT"] = true; $MESS = '<span class="adm-informer-strong-text">' . GetMessage("BCL_BACKUP_AI_LAST_TIME") . ': ' . FormatDate(array("today" => "today", "yesterday" => "yesterday", "" => "dago"), $backup->getLastTimeBackup()) . '.</span>'; $CDNAIParams["FOOTER"] = '<a href="/bitrix/admin/dump.php?lang=' . LANGUAGE_ID . '">' . GetMessage("BCL_BACKUP_AI_DO_BACKUP_STRONGLY") . '</a>'; } else { $AVAIL = $backup->getQuota() - $backup->getUsage(); if ($AVAIL < 0.0) { $AVAIL = 0.0; } $PROGRESS_FREE = round($AVAIL / $backup->getQuota() * 100); $ALLOWED = CFile::FormatSize($backup->getQuota(), 0); $CDNAIParams["ALERT"] = false; $MESS = GetMessage("BCL_BACKUP_AI_LAST_TIME") . ': ' . FormatDate(array("today" => "today", "yesterday" => "yesterday", "" => "dago"), $backup->getLastTimeBackup()); $CDNAIParams["FOOTER"] = '<a href="/bitrix/admin/dump.php?lang=' . LANGUAGE_ID . '">' . GetMessage("BCL_BACKUP_AI_DO_BACKUP") . '</a>'; } if (isset($CDNAIParams["ALERT"])) { $PROGRESS_FREE_BAR = $PROGRESS_FREE < 0 ? 0 : $PROGRESS_FREE; $CDNAIParams["HTML"] = ' <div class="adm-informer-item-section"> <span class="adm-informer-item-l"> <span class="adm-informer-strong-text">' . GetMessage("BCL_BACKUP_AI_USAGE_TOTAL") . '</span> ' . $ALLOWED . ' </span> <span class="adm-informer-item-r"> <span class="adm-informer-strong-text">' . GetMessage("BCL_BACKUP_AI_USAGE_AVAIL") . '</span> ' . CFile::FormatSize($AVAIL, 0) . ' </span> </div> <div class="adm-informer-status-bar-block" > <div class="adm-informer-status-bar-indicator" style="width:' . (100 - $PROGRESS_FREE_BAR) . '%; "></div> <div class="adm-informer-status-bar-text">' . (100 - $PROGRESS_FREE) . '%</div> </div> ' . $MESS; CAdminInformer::AddItem($CDNAIParams); } }
if (!empty($ar)) { foreach ($ar as $name => $tags) { $arr = array("TAG_NAME" => $tags, "TAG_URL" => CComponentEngine::MakePathFromTemplate($arParams["~SEARCH_URL"], array())); $arr["TAG_URL"] .= (strpos($arr["TAG_URL"], "?") === false ? "?" : "&") . "tags=" . $tags; $arElement["TAGS_LIST"][] = $arr; } } } if ($arElement["PREVIEW_TEXT"] == "" && $arElement["NAME"] != "" && !preg_match('/\\d{3,}/', $arElement["NAME"])) { $arElement["~NAME"] = preg_replace(array('/\\.jpg/i', '/\\.jpeg/i', '/\\.gif/i', '/\\.png/i', '/\\.bmp/i'), '', $arElement["~NAME"]); $arElement["~PREVIEW_TEXT"] = $arElement["~NAME"]; $arElement["PREVIEW_TEXT"] = htmlspecialcharsbx($arElement["~PREVIEW_TEXT"]); } unset($arElement["DETAIL_PICTURE"]); $arElements[$arElement["ID"]] = $arElement; $arElementsJS[$arElement["ID"]] = array("id" => intVal($arElement["ID"]), "active" => $arElement["ACTIVE"] == "Y" ? "Y" : "N", "title" => $arElement["NAME"], "album_id" => $arElement["IBLOCK_SECTION_ID"], "album_name" => $arSections[$arElement["IBLOCK_SECTION_ID"]]["NAME"], "gallery_id" => $arGallery["CODE"], "description" => $arElement["~PREVIEW_TEXT"], "shows" => $arElement["SHOW_COUNTER"], "index" => $index, "author_id" => $arElement['CREATED_BY'], "date" => FormatDate('x', MakeTimeStamp($arElement["DATE_CREATE"], CSite::GetDateFormat())), "author_name" => CUser::FormatName($arParams['NAME_TEMPLATE'], $arUsers[$arElement['CREATED_BY']], $arParams["SHOW_LOGIN"] != 'N'), "comments" => $arParams["SHOW_COMMENTS"] == "Y" ? intVal($arParams["COMMENTS_TYPE"] != "BLOG" ? $arElement["PROPERTIES"]["FORUM_MESSAGE_CNT"]["VALUE"] : $arElement["PROPERTIES"]["BLOG_COMMENTS_CNT"]["VALUE"]) : "", "detail_url" => $arElement["~URL"]); if ($arParams['DRAG_SORT'] == "Y") { $arElementsJS[$arElement["ID"]]['sort'] = $arElement["SORT"]; } if ($arParams["SHOW_TAGS"]) { $arElementsJS[$arElement["ID"]]['tags'] = $arElement["TAGS"]; if ($bParseTags) { $arElementsJS[$arElement["ID"]]['tags_array'] = $arElement["TAGS_LIST"]; } } $index++; } $strFileId = trim($strFileId, " ,"); if (strLen($strFileId) > 0) { $rsFile = CFile::GetList(array(), array("@ID" => $strFileId)); $upload = COption::GetOptionString("main", "upload_dir", "upload");
right: 5px; top: 5px; color:#00d7ff;"><?php echo $arEv["PROPS"]["CITY"]["VALUE"]; ?> </div> <div class="calendar-event-data"> <div class="calendar-event-data-week"><?php echo FormatDate(array("d" => 'l'), strtotime($arEv["PROPS"]["START_DATE"]["VALUE"])); ?> </div> <div class="calendar-event-data-day"><?php echo FormatDate(array("d" => 'd'), strtotime($arEv["PROPS"]["START_DATE"]["VALUE"])); ?> </div> <div class="calendar-event-data-month"><?php echo FormatDate(array("d" => 'F'), strtotime($arEv["PROPS"]["START_DATE"]["VALUE"])); ?> </div> </div> <div class="calendar-event-name"> <div class="calendar-event-name-head"> at The Ushuaia Complex </div> <div class="calendar-event-name-main"><?php echo $arEv["NAME"]; ?> </div> </div> </div> <?php }
if ($itemCnt == 0) { $arTmp["FIRST"] = "Y"; } $text = preg_replace("#\\[img\\](.+?)\\[/img\\]#is", "", $arPost["~DETAIL_TEXT"]); $text = preg_replace("#\\[url(.+?)\\](.*?)\\[/url\\]#is", "\\2", $text); $text = preg_replace("#\\[video(.+?)\\](.+?)\\[/video\\]#is", "", $text); $text = preg_replace("#^(.+?)<cut[\\s]*(/>|>).*?\$#is", "\\1", $text); $text = preg_replace("#^(.+?)\\[cut[\\s]*(/\\]|\\]).*?\$#is", "\\1", $text); $text = preg_replace("#(\\[|<)(/?)(b|u|i|list|code|quote|url|img|color|font|/*)(.*?)(\\]|>)#is", "", $text); $text = TruncateText($text, $arParams["MESSAGE_LENGTH"]); $text1 = $text; $title = $p->convert($text1, true, false, array("HTML" => "N", "ANCHOR" => "N", "BIU" => "N", "IMG" => "N", "QUOTE" => "N", "CODE" => "N", "FONT" => "N", "LIST" => "N", "SMILES" => "N", "NL2BR" => "N")); $text = $p->convert($text, true, false, array("HTML" => "N", "ANCHOR" => "N", "BIU" => "N", "IMG" => "N", "QUOTE" => "N", "CODE" => "N", "FONT" => "N", "LIST" => "N", "SMILES" => "Y", "NL2BR" => "N")); $text = CBlogTools::DeleteDoubleBR($text); $arTmp["TEXT_FORMATED"] = $text; $arTmp["DATE_PUBLISH_FORMATED"] = FormatDate($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($arTmp["DATE_PUBLISH"], CSite::GetDateFormat("FULL"))); if ($arTmp["MICRO"] == "Y") { $arTmp["TITLE"] = TruncateText(str_replace(array("<br />", "<br>", "'", """, "<", ">"), "", $title), 60); $arTmp["~TITLE"] = htmlspecialcharsback($arTmp["TITLE"]); } $itemCnt++; $arResult[] = $arTmp; $ids[] = $arTmp["ID"]; } $arResult["IDS"] = $ids; } if ($arParams["CACHE_TIME"] > 0) { $cache->EndDataCache(array("templateCachedData" => $this->GetTemplateCachedData(), "arResult" => $arResult)); } } if ($arParams["SHOW_RATING"] == "Y" && !empty($arResult["IDS"])) {
$_SESSION['solda_nexttype'] = 'desc'; } if (!isset($_SESSION['solda_type']) || $_SESSION['solda_type'] == 'desc') { $_SESSION['solda_type_img'] = '<img src="images/arrow_up.gif" align="center" hspace="2" border="0" alt="up"/>'; } else { $_SESSION['solda_type_img'] = '<img src="images/arrow_down.gif" align="center" hspace="2" border="0" alt="down"/>'; } $query = "SELECT a.* FROM " . $DBPrefix . "auctions a\n\tLEFT JOIN " . $DBPrefix . "winners w ON (a.id = w.auction)\n\tWHERE a.user = :user_id\n\tAND a.closed = 1\n\tAND a.suspended = 0\n\tGROUP BY w.auction\n\tORDER BY " . $_SESSION['solda_ord'] . " " . $_SESSION['solda_type'] . " LIMIT :offset, :perpage"; $params = array(); $params[] = array(':user_id', $user->user_data['id'], 'int'); $params[] = array(':offset', $OFFSET, 'int'); $params[] = array(':perpage', $system->SETTINGS['perpage'], 'int'); $db->query($query, $params); $i = 0; while ($item = $db->fetch()) { $template->assign_block_vars('items', array('BGCOLOUR' => !($i % 2) ? '' : 'class="alt-row"', 'ID' => $item['id'], 'TITLE' => $system->uncleanvars($item['title']), 'STARTS' => FormatDate($item['starts']), 'ENDS' => FormatDate($item['ends']), 'BID' => $item['current_bid'] == 0 ? '-' : $system->print_money($item['current_bid']), 'BIDS' => $item['num_bids'], 'B_CLOSED' => $item['closed'] == 1, 'B_HASNOBIDS' => $item['current_bid'] == 0)); $i++; } // get pagenation $PREV = intval($PAGE - 1); $NEXT = intval($PAGE + 1); if ($PAGES > 1) { $LOW = $PAGE - 5; if ($LOW <= 0) { $LOW = 1; } $COUNTER = $LOW; while ($COUNTER <= $PAGES && $COUNTER < $PAGE + 6) { $template->assign_block_vars('pages', array('PAGE' => $PAGE == $COUNTER ? '<b>' . $COUNTER . '</b>' : '<a href="' . $system->SETTINGS['siteurl'] . 'yourauctions_sold.php?PAGE=' . $COUNTER . '&id=' . $id . '"><u>' . $COUNTER . '</u></a>')); $COUNTER++; }
} echo '</div>'; } ?> </div><?php } else { ?> <div class="c-list__item c-list__item_with-border" id="<?php echo $this->GetEditAreaId($arItem['ID']); ?> "><?php if (!empty($arItem['DISPLAY_PROPERTIES']['EXIBITION_LOCATION']['VALUE']) || $arParams['DISPLAY_DATE'] != "N" && (!empty($arItem['DISPLAY_ACTIVE_FROM']) || !empty($arItem['PROPERTIES']['START_DATE']['VALUE']))) { ?> <div class="c-list__holder"><?php if ($arParams['DISPLAY_DATE'] != "N" && (!empty($arItem['DISPLAY_ACTIVE_FROM']) || !empty($arItem['PROPERTIES']['START_DATE']['VALUE']))) { $strDate = empty($arItem['PROPERTIES']['START_DATE']['VALUE']) ? $arItem['DISPLAY_ACTIVE_FROM'] : FormatDate($arParams['ACTIVE_DATE_FORMAT'], MakeTimeStamp($arItem['PROPERTIES']['START_DATE']['VALUE'])); ?> <div class="c-list__date"><?php echo $strDate; ?> </div><?php } if (!empty($arItem['DISPLAY_PROPERTIES']['EXIBITION_LOCATION']['VALUE'])) { ?> <div class="c-list__place"><?php echo strip_tags($arItem['DISPLAY_PROPERTIES']['EXIBITION_LOCATION']['DISPLAY_VALUE']); ?> </div><?php } ?> </div><?php
$item["IBLOCK_ID"], $item["ID"], 0, array("SECTION_BUTTONS"=>false, "SESSID"=>false) ); $item["EDIT_LINK"] = $arButtons["edit"]["edit_element"]["ACTION_URL"]; $item["DELETE_LINK"] = $arButtons["edit"]["delete_element"]["ACTION_URL"]; if ($item["PREVIEW_PICTURE"]) { if ($arParams["RESIZE_PREVIEW_PICTURE"] === "Y") { $item["PREVIEW_PICTURE"] = \imageResize(array("WIDTH" => $arParams["RESIZE_WIDTH"], "HEIGHT" => $arParams["RESIZE_HEIGHT"], "MODE" => "cut"), \CFile::GetPath($item["PREVIEW_PICTURE"])); } else { $item["PREVIEW_PICTURE"] = \CFile::GetPath($item["PREVIEW_PICTURE"]); } } if ($arParams["SHOW_DATE"] === "Y") { $item["DATE"]["DAY"] = FormatDate('d', MakeTimeStamp($item["DATE_ACTIVE_FROM"])); $item["DATE"]["MONTH"] = FormatDate('F', MakeTimeStamp($item["DATE_ACTIVE_FROM"])); } if (!$item["PREVIEW_TEXT"]) { if ($arParams["CUT_TEXT_VALUE"]) { $item["PREVIEW_TEXT"] = \Ns\Bitrix\Helper::Create('iblock')->useVariant('text')->cut($item["PREVIEW_TEXT"], ($arParams["CUT_TEXT_VALUE"]) ? $arParams["CUT_TEXT_VALUE"] : false); } } $arResult["ITEMS"][$item["ID"]] = $item; } $obCache->EndDataCache(array("arResult" => $arResult)); } $this->IncludeComponentTemplate();
if ($db->numrows() == 0) { $_SESSION['msg_title'] = $ERR_622; $_SESSION['msg_body'] = $ERR_623; header('location: message.php'); exit; } $auction_data = $db->result(); $category = $auction_data['category']; $auction_type = $auction_data['auction_type']; $ends = $auction_data['ends']; $start = $auction_data['starts']; $user_id = $auction_data['user']; $minimum_bid = $auction_data['minimum_bid']; $high_bid = $auction_data['current_bid']; $customincrement = $auction_data['increment']; $seller_reg = FormatDate($auction_data['reg_date'], '/', false); // sort out counter if (empty($auction_data['counter'])) { $query = "INSERT INTO `" . $DBPrefix . "auccounter` (`auction_id`, `counter`) VALUES (:counter, 1)"; $params = array(); $params[] = array(':counter', $id, 'int'); $db->query($query, $params); $auction_data['counter'] = 1; } else { if (!isset($_SESSION['WEBID_VIEWED_AUCTIONS'])) { $_SESSION['WEBID_VIEWED_AUCTIONS'] = array(); } if (!in_array($id, $_SESSION['WEBID_VIEWED_AUCTIONS'])) { $query = "UPDATE " . $DBPrefix . "auccounter set counter = counter + 1 WHERE auction_id = :auction_id"; $params = array(); $params[] = array(':auction_id', $id, 'int');
} if (!isset($_SESSION['pa_type']) || $_SESSION['pa_type'] == 'desc') { $_SESSION['pa_type_img'] = '<img src="images/arrow_up.gif" align="center" hspace="2" border="0" />'; } else { $_SESSION['pa_type_img'] = '<img src="images/arrow_down.gif" align="center" hspace="2" border="0" />'; } $query = "SELECT * FROM " . $DBPrefix . "auctions au\n\tWHERE user = :user_id AND starts > :time AND suspended = 0\n\tORDER BY " . $_SESSION['pa_ord'] . " " . $_SESSION['pa_type'] . " LIMIT :offset, :perpage"; $params = array(); $params[] = array(':user_id', $user->user_data['id'], 'int'); $params[] = array(':time', $NOW, 'int'); $params[] = array(':offset', $OFFSET, 'int'); $params[] = array(':perpage', $system->SETTINGS['perpage'], 'int'); $db->query($query, $params); $i = 0; while ($item = $db->fetch()) { $template->assign_block_vars('items', array('BGCOLOUR' => !($i % 2) ? '' : 'class="alt-row"', 'ID' => $item['id'], 'TITLE' => $system->uncleanvars($item['title']), 'STARTS' => FormatDate($item['starts'], '/', false), 'ENDS' => FormatDate($item['ends'], '/', false), 'B_HASNOBIDS' => $item['current_bid'] == 0)); $i++; } // get pagenation $PREV = intval($PAGE - 1); $NEXT = intval($PAGE + 1); if ($PAGES > 1) { $LOW = $PAGE - 5; if ($LOW <= 0) { $LOW = 1; } $COUNTER = $LOW; while ($COUNTER <= $PAGES && $COUNTER < $PAGE + 6) { $template->assign_block_vars('pages', array('PAGE' => $PAGE == $COUNTER ? '<b>' . $COUNTER . '</b>' : '<a href="' . $system->SETTINGS['siteurl'] . 'yourauctions_p.php?PAGE=' . $COUNTER . '"><u>' . $COUNTER . '</u></a>')); $COUNTER++; }
$ERR = $ERR_006; } else { // Update $query = "UPDATE " . $DBPrefix . "adminusers SET"; if (!empty($_POST['password'])) { $query .= " password = '******'password']) . "', "; } $query .= " status = " . intval($_POST['status']) . "\tWHERE id = " . $id; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); header('location: adminusers.php'); exit; } } $query = "SELECT * FROM " . $DBPrefix . "adminusers WHERE id = " . $id; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); $user_data = mysql_fetch_assoc($res); if ($system->SETTINGS['datesformat'] == 'USA') { $CREATED = substr($user_data['created'], 4, 2) . '/' . substr($user_data['created'], 6, 2) . '/' . substr($user_data['created'], 0, 4); } else { $CREATED = substr($user_data['created'], 6, 2) . '/' . substr($user_data['created'], 4, 2) . '/' . substr($user_data['created'], 0, 4); } if ($user_data['lastlogin'] == 0) { $LASTLOGIN = $MSG['570']; } else { $LASTLOGIN = FormatDate($user_data['lastlogin']); } $template->assign_vars(array('ERROR' => isset($ERR) ? $ERR : '', 'ID' => $id, 'USERNAME' => $user_data['username'], 'CREATED' => $CREATED, 'LASTLOGIN' => $LASTLOGIN, 'B_ACTIVE' => $user_data['status'] == 1, 'B_INACTIVE' => $user_data['status'] == 2)); $template->set_filenames(array('body' => 'editadminuser.tpl')); $template->display('body');
} $arUserIDs = array(); $dbReports = CTimeManReport::GetList(array('ID' => 'ASC'), array('ENTRY_ID' => $arInfo['INFO']['ID'])); while ($arReport = $dbReports->Fetch()) { switch ($arReport['REPORT_TYPE']) { case 'ERR_OPEN': case 'ERR_CLOSE': case 'ERR_DURATION': $arUserIDs[] = $arReport['USER_ID']; $key = $arReport['REPORT_TYPE'] == 'ERR_OPEN' ? 'TIME_START' : ($arReport['REPORT_TYPE'] == 'ERR_CLOSE' ? 'TIME_FINISH' : 'DURATION'); $arReportData = explode(';', $arReport['REPORT']); if (!$res['REPORTS'][$key]) { $res['REPORTS'][$key] = array(); } $report_ts = strtotime($arReportData[1]) + CTimeZone::GetOffset(); $res['REPORTS'][$key][0] = array('TYPE' => $arReportData[0], 'TYPE_TEXT' => $arReportData[0], 'TIME' => $report_ts + date('Z'), 'DATE_TIME' => FormatDate(str_replace(':s', '', $DB->DateFormatToPHP(FORMAT_DATETIME)), MakeTimeStamp($arReport['TIMESTAMP_X'])), 'ACTIVE' => $arReport['ACTIVE'] == 'Y', 'USER_ID' => $arReport['USER_ID']); break; case 'REPORT_OPEN': case 'REPORT_CLOSE': case 'REPORT_DURATION': $key = $arReport['REPORT_TYPE'] == 'REPORT_OPEN' ? 'TIME_START' : ($arReport['REPORT_TYPE'] == 'REPORT_CLOSE' ? 'TIME_FINISH' : 'DURATION'); if (count($res['REPORTS'][$key]) > 0) { if (strlen($arReport['REPORT']) > 150) { $arReport['REPORT_FULL'] = $arReport['REPORT']; $arReport['REPORT'] = substr($arReport['REPORT'], 0, 150) . '...'; } $res['REPORTS'][$key][0]['REPORT'] = htmlspecialcharsbx($arReport['REPORT']); if ($arReport['REPORT_FULL']) { $res['REPORTS'][$key][count($res['REPORTS'][$key]) - 1]['REPORT_FULL'] = htmlspecialcharsbx($arReport['REPORT_FULL']); } }