当前位置: 首页>>代码示例>>PHP>>正文


PHP CDatabase::DateFormatToPHP方法代码示例

本文整理汇总了PHP中CDatabase::DateFormatToPHP方法的典型用法代码示例。如果您正苦于以下问题:PHP CDatabase::DateFormatToPHP方法的具体用法?PHP CDatabase::DateFormatToPHP怎么用?PHP CDatabase::DateFormatToPHP使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDatabase的用法示例。


在下文中一共展示了CDatabase::DateFormatToPHP方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mark_order_as_error

	protected function mark_order_as_error($order, array $data) {
		CSaleOrder::Update($order['ID'], array(
			'PS_STATUS' => 'N',
			'PS_SUM' => $data['amount'],
			'PS_CURRENCY' => $data['currency'],
			'PS_STATUS_MESSAGE' => $data['message'],
			'PS_RESPONSE_DATE' => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat('FULL', LANG))),
		));
	}
开发者ID:ASDAFF,项目名称:bitrix-futupayments,代码行数:9,代码来源:result_rec.php

示例2: setPayed

 public function setPayed($value)
 {
     $value = (bool) $value ? 'Y' : 'N';
     if ($value == 'Y') {
         \CSaleOrder::PayOrder($this['ID'], 'Y');
     } else {
         $data = array('PAYED' => (bool) $value ? 'Y' : 'N', 'DATE_PAYED' => Date(\CDatabase::DateFormatToPHP(\CLang::GetDateFormat('FULL', LANG))), 'USER_ID' => $this['USER_ID']);
         return \CSaleOrder::Update($this['ID'], $data);
     }
 }
开发者ID:AlexSmerw,项目名称:domino,代码行数:10,代码来源:Order.class.php

示例3: XMLDate2Dec

	function XMLDate2Dec($date_XML, $dateFormat = "DD.MM.YYYY")
	{
		static $MonthChar2Num = Array("","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");

		if(preg_match("/(\\d+)\\s+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s+(\\d+)/i", $date_XML, $match))
			$timestamp = mktime(0, 0, 0, array_search(strtolower($match[2]), $MonthChar2Num), $match[1], $match[3]);
		else
			$timestamp = time();

		return  date(CDatabase::DateFormatToPHP($dateFormat), $timestamp);
	}
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:11,代码来源:iblockrss.php

示例4: urlencode

 // Login ID
 $parms .= "&VENDOR=" . urlencode($PF_USER);
 // Vendor ID
 $parms .= "&ZIP=" . urlencode($zipcode);
 // Zip
 $parms .= "&STREET=" . urlencode($address1);
 // Address
 $parms .= "&COMMENT1=" . $ORDER_ID;
 $parms .= "&COMMENT2=" . urlencode($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["DATE_INSERT"]);
 $ret_com = "{$strExePath} {$PF_HOST} {$PF_PORT} \"{$parms}\" 30";
 putenv("PFPRO_CERT_PATH=" . $PFPRO_CERT_PATH);
 exec($ret_com, $arOutput, $ret_var);
 $strOutput = $arOutput[0];
 parse_str($strOutput, $arResult);
 if (is_array($arResult) && strlen($arResult["RESULT"]) > 0) {
     $arPaySysResult = array("PS_STATUS" => $arResult["RESULT"] == 0 ? "Y" : "N", "PS_STATUS_CODE" => $arResult["RESULT"], "PS_STATUS_DESCRIPTION" => $arResult["RESPMSG"] . " - " . $arResult["PREFPSMSG"], "PS_STATUS_MESSAGE" => $arResult["PNREF"], "PS_SUM" => $AMT, "PS_CURRENCY" => "USD", "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", SITE_ID))), "USER_CARD_TYPE" => false, "USER_CARD_NUM" => $cardnum, "USER_CARD_EXP_MONTH" => $cardexp1, "USER_CARD_EXP_YEAR" => "20" . $cardexp2, "USER_CARD_CODE" => $cvv2);
     $arResult["RESULT"] = IntVal($arResult["RESULT"]);
     if ($arResult["RESULT"] != 0) {
         if ($arResult["RESULT"] < 0) {
             $strPaySysError .= "Communication Error: [" . $arResult["RESULT"] . "] " . $arResult["RESPMSG"] . " - " . $arResult["PREFPSMSG"] . ". ";
         } elseif ($arPaySysRes_tmp["RESULT"] == 125) {
             $strPaySysError .= "Your payment is declined by Fraud Service. Please contact us to make payment" . ". ";
         } elseif ($arResult["RESULT"] == 126) {
             $strPaySysWarning .= "Your payment is under review by Fraud Service. We contact you in 48 hours to get more specific information" . ". ";
         } elseif (is_set($arErrorCodes, $arResult["RESULT"])) {
             $strPaySysError .= $arErrorCodes[$arResult["RESULT"]] . ". ";
         } else {
             $strPaySysError .= "Unknown error" . ". ";
         }
     }
 } else {
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:pre_payment.php

示例5: array

// ADDITIONAL FILTERS
if ($arParams["ELEMENT_LAST_TYPE"] == "count" && $arParams["ELEMENTS_LAST_COUNT"] > 0) {
    $db_res = CIBlockElement::GetList(array("ID" => "DESC"), $arFilter, false, array("nTopCount" => $arParams["ELEMENTS_LAST_COUNT"]), array("ID"));
    $iLastID = 0;
    // WTF?
    while ($res = $db_res->Fetch()) {
        $arFilter[">=ID"] = intVal($res["ID"]);
    }
} elseif ($arParams["ELEMENT_LAST_TYPE"] == "time" && $arParams["ELEMENTS_LAST_TIME"] > 0) {
    $arFilter[">=DATE_CREATE"] = date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG)), time() - $arParams["ELEMENTS_LAST_TIME"] * 3600 * 24 + CTimeZone::GetOffset());
} elseif ($arParams["ELEMENT_LAST_TYPE"] == "period" && (strLen($arParams["ELEMENTS_LAST_TIME_FROM"]) > 0 || strLen($arParams["ELEMENTS_LAST_TIME_TO"]) > 0)) {
    if (strLen($arParams["ELEMENTS_LAST_TIME_FROM"]) > 0) {
        $arFilter[">=DATE_CREATE"] = date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG)), MakeTimeStamp($arParams["ELEMENTS_LAST_TIME_FROM"]));
    }
    if (strLen($arParams["ELEMENTS_LAST_TIME_TO"]) > 0) {
        $arFilter["<=DATE_CREATE"] = date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG)), MakeTimeStamp($arParams["ELEMENTS_LAST_TIME_TO"]));
    }
}
if (!empty($arParams["ELEMENT_FILTER"])) {
    $arFilter = array_merge($arParams["ELEMENT_FILTER"], $arFilter);
}
if ($arNavParams && ($arParams["ELEMENT_ID"] > 0 || $arParams["SELECTED_ELEMENT"])) {
    CModule::IncludeModule("iblock");
    $db_res = CIBlockElement::GetList($arSort, $arFilter, false, array("nElementID" => $arParams["ELEMENT_ID"]), array("ID", "NAME"));
    if ($db_res && ($res = $db_res->Fetch())) {
        $number = $res["RANK"];
        if ($arParams["PAGE_NAVIGATE"] == "next") {
            $number++;
        } elseif ($arParams["PAGE_NAVIGATE"] == "prev") {
            $number--;
        }
开发者ID:,项目名称:,代码行数:31,代码来源:

示例6: getProductDataToFillBasket

		$arParams = getProductDataToFillBasket($productId, $quantity, $userId, $LID, $userColumns);

		$result = CUtil::PhpToJSObject(array("params" => $arParams, "type" => $type));

		CRMModeOutput($result);
	}

}//end ORDER_AJAX=Y

/*****************************************************************************/
/**************************** FORM ORDER *************************************/
/*****************************************************************************/

//date order
$str_DATE_UPDATE = Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", $lang)));
$str_DATE_INSERT = Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", $lang)));

if (isset($ID) && $ID > 0)
{
	if (!$arOrderOldTmp)
		LocalRedirect("sale_order.php?lang=".LANGUAGE_ID.GetFilterParams("filter_", false));

	$LID = $str_LID;
	$str_DELIVERY_ID = (isset($_POST["DELIVERY_ID"]) && strlen($_POST["DELIVERY_ID"]) > 0) ? $_POST["DELIVERY_ID"] : $str_DELIVERY_ID;
	$str_PAY_SYSTEM_ID = (isset($_POST["PAY_SYSTEM_ID"]) && intval($_POST["PAY_SYSTEM_ID"]) > 0) ? intval($_POST["PAY_SYSTEM_ID"]) : $str_PAY_SYSTEM_ID;
}

if (!isset($str_TAX_VALUE) OR $str_TAX_VALUE == "")
	$str_TAX_VALUE = 0;

if (intval($str_PERSON_TYPE_ID) <= 0)
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:order_new.php

示例7: date

echo date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG)), $arParam["db"]["time"]);
?>
</span>)
	</label></td></tr>
	<tr><td><div class="pbar-mark-green"></div></td><td><input type="radio" name="size" id="files" value="files" onclick="CheckButtons(this);" /><input type="hidden" name="result_files" id="result_files" value="<?php 
echo $arParam["files"]["status"];
?>
" /> <label for="files"><?php 
echo GetMessage("MAIN_OPTION_SIZE_DISTR");
?>
: <span id="div_files"><?php 
echo round($arParam["files"]["size"] / 1048576, 2);
?>
</span>Mb</label>
	(<span id="div_time_files"><?php 
echo date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG)), $arParam["files"]["time"]);
?>
</span>)</td></tr></table><?
	$usedSpace = intVal(($usedSpace/$diskSpace)*100);
?><div class="pbar-outer">
		<div id="pb_db" class="pbar-inner-red<?php 
echo $arParam["db"]["status"] == "done" ? "" : "-error";
?>
" style="width:<?php 
echo intVal($arParam["db"]["size_in_per"] * 350);
?>
px; padding-left:<?php 
echo intVal($arParam["db"]["size_in_per"] * 350);
?>
px;">&nbsp;</div><div id="pb_files" class="pbar-inner-green<?php 
echo $arParam["files"]["status"] == "done" ? "" : "-error";
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:options.php

示例8: array

        } else {
            $strPS_STATUS_DESCRIPTION = (IntVal($mass[1]) == 2 ? "Declined" : "Error") . ": " . $mass[4] . " (Reason Code " . $mass[3] . " / Sub " . $mass[2] . ")";
            $strPaySysError .= (IntVal($mass[1]) == 2 ? "Transaction was declined" : "Error while processing transaction") . ": " . $mass[4] . " (" . $mass[3] . "/" . $mass[2] . ")";
        }
        $strPS_STATUS_MESSAGE = "";
        if (!empty($mass[6])) {
            $strPS_STATUS_MESSAGE .= "\nAVS Result: [" . $mass[6] . "] " . $arAVSErr[$mass[6]] . ";";
        }
        if (!empty($mass[39])) {
            $strPS_STATUS_MESSAGE .= "\nCard Code Result: [" . $mass[39] . "] " . $arCVVErr[$mass[39]] . ";";
        }
        if (!empty($mass[40])) {
            $strPS_STATUS_MESSAGE .= "\nCAVV: [" . $mass[40] . "] " . $arCAVVErr[$mass[40]] . ";";
        }
        $strPS_SUM = $mass[10];
        $arPaySysResult = array("PS_STATUS" => $strPS_STATUS, "PS_STATUS_CODE" => $strPS_STATUS_CODE, "PS_STATUS_DESCRIPTION" => $strPS_STATUS_DESCRIPTION, "PS_STATUS_MESSAGE" => $strPS_STATUS_MESSAGE, "PS_SUM" => $strPS_SUM, "PS_CURRENCY" => $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["CURRENCY"], "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", SITE_ID))), "USER_CARD_TYPE" => false, "USER_CARD_NUM" => $INPUT_CARD_NUM, "USER_CARD_EXP_MONTH" => $INPUT_CARD_EXP_MONTH, "USER_CARD_EXP_YEAR" => $INPUT_CARD_EXP_YEAR, "USER_CARD_CODE" => $INPUT_CARD_CODE);
    }
} else {
    ?>
	<table border="0" cellpadding="3" cellspacing="0" width="100%">
		<tr>
			<td align="right" width="40%" class="tablebody">
				<font class="tablebodytext">
				<?php 
    echo GetMessage("AN_CC");
    ?>
				</font>
			</td>
			<td class="tablebody" width="60%">
				<input type="text" class="inputtext" name="ccard_num" size="30" value="<?php 
    echo htmlspecialcharsbx($_REQUEST["ccard_num"]);
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:pre_payment.php

示例9: substr

']['size'] = '<?php 
        echo $res['size'];
        ?>
';
	window.parent.window.result['<?php 
        echo CUtil::JSEscape($_REQUEST["name"]);
        ?>
']['status'] = '<?php 
        echo substr($res['status'], 0, 1);
        ?>
';
	window.parent.window.result['<?php 
        echo CUtil::JSEscape($_REQUEST["name"]);
        ?>
']['time'] = '<?php 
        echo date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG)), $res["time"]);
        ?>
';
	
	window.parent.window.result['stop'] = <?php 
        echo $res["status"] == "continue" ? "false" : "true";
        ?>
;
	window.parent.window.result['error'] = false;
	
	window.parent.window.onStepDone('<?php 
        echo CUtil::JSEscape($_REQUEST["name"]);
        ?>
');
<?php 
    }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:quota.php

示例10: AddToTimeStamp

$sHost = "payments.paysecure.ru";
$sUrl = "/orderstate/orderstate.cfm";
$dtm = AddToTimeStamp(array("MM" => -1), false);
$sVars = "Ordernumber=" . $ORDER_ID . "&Merchant_ID=" . $assist_Shop_IDP . "&login=" . $assist_LOGIN . "&password=" . $assist_PASSWORD . "&FORMAT=3&StartYear=" . date('Y', $dtm) . "&StartMonth=" . date('n', $dtm) . "&StartYDay=" . date('j', $dtm) . "";
$aDesc = array("In Process" => array(GetMessage("SASP_IP"), GetMessage("SASPD_IP")), "Delayed" => array(GetMessage("SASP_D"), GetMessage("SASPD_D")), "Approved" => array(GetMessage("SASP_A"), GetMessage("SASPD_A")), "PartialApproved" => array(GetMessage("SASP_PA"), GetMessage("SASPD_PA")), "PartialDelayed" => array(GetMessage("SASP_PD"), GetMessage("SASPD_PD")), "Canceled" => array(GetMessage("SASP_C"), GetMessage("SASPD_C")), "PartialCanceled" => array(GetMessage("SASP_PC"), GetMessage("SASPD_PC")), "Declined" => array(GetMessage("SASP_DEC"), GetMessage("SASPD_DEC")), "Timeout" => array(GetMessage("SASP_T"), GetMessage("SASPD_T")));
$sResult = QueryGetData($sHost, 80, $sUrl, $sVars, $errno, $errstr, "POST");
if ($sResult != "") {
    require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/xml.php";
    $objXML = new CDataXML();
    $objXML->LoadString($sResult);
    $arResult = $objXML->GetArray();
    if (count($arResult) > 0 && $arResult["result"]["@"]["firstcode"] == "0") {
        $aRes = $arResult["result"]["#"]["order"][0]["#"];
        if (IntVal($aRes["ordernumber"][0]["#"]) == $ORDER_ID) {
            $arFields = array();
            $check = ToUpper(md5(toUpper(md5($password) . md5($assist_Shop_IDP . $aRes["ordernumber"][0]["#"] . $aRes["orderamount"][0]["#"] . $aRes["ordercurrency"][0]["#"] . $aRes["orderstate"][0]["#"]))));
            if ($aRes["checkvalue"][0]["#"] == $check) {
                $arOrder = CSaleOrder::GetByID($ORDER_ID);
                $arFields = array("PS_STATUS" => $aRes["orderstate"][0]["#"] == "Approved" ? "Y" : "N", "PS_STATUS_CODE" => substr($aRes["orderstate"][0]["#"], 0, 5), "PS_STATUS_DESCRIPTION" => $aDesc[$aRes["orderstate"][0]["#"]][0], "PS_STATUS_MESSAGE" => $aDesc[$aRes["orderstate"][0]["#"]][1], "PS_SUM" => DoubleVal($aRes["orderamount"][0]["#"]), "PS_CURRENCY" => $aRes["ordercurrency"][0]["#"], "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG))));
                if ($arOrder["PAYED"] != "Y" && CSalePaySystemAction::GetParamValue("AUTOPAY") == "Y" && $arFields["PS_STATUS"] == "Y" && Doubleval($arOrder["PRICE"]) == DoubleVal($arFields["PS_SUM"])) {
                    CSaleOrder::PayOrder($arOrder["ID"], "Y");
                }
            }
            if (!empty($arFields)) {
                CSaleOrder::Update($ORDER_ID, $arFields);
            }
            return true;
        }
    }
}
return false;
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:result.php

示例11: Date

}
$bUserCanViewOrder = CSaleOrder::CanUserViewOrder($ID, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID());
$bUserCanEditOrder = CSaleOrder::CanUserUpdateOrder($ID, $GLOBALS["USER"]->GetUserGroupArray());
$bUserCanCancelOrder = CSaleOrder::CanUserCancelOrder($ID, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID());
$bUserCanPayOrder = CSaleOrder::CanUserChangeOrderFlag($ID, "P", $GLOBALS["USER"]->GetUserGroupArray());
$bUserCanDeliverOrder = CSaleOrder::CanUserChangeOrderFlag($ID, "D", $GLOBALS["USER"]->GetUserGroupArray());
$bUserCanDeleteOrder = CSaleOrder::CanUserDeleteOrder($ID, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID());
$simpleForm = COption::GetOptionString("sale", "lock_catalog", "Y");
$bSimpleForm = $simpleForm == "Y" ? True : False;
if ($action == "update" && $saleModulePermissions >= "U" && $_SERVER["REQUEST_METHOD"] == "POST" && check_bitrix_sessid() && $bUserCanEditOrder && $PARTIAL_SUBMIT != "Y" && empty($dontsave)) {
    // *****************************************************************
    // *****  Preparing  ***********************************************
    // *****************************************************************
    $bTrabsactionStarted = False;
    // Order params
    $currentDate = Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG)));
    $dbOrderTmp = CSaleOrder::GetList(array(), array("ID" => $ID));
    //GetByID($ID);
    $arOrder = $dbOrderTmp->Fetch();
    if (!$arOrder) {
        $errorMessage .= GetMessage("SOE_NO_ORDER") . ". ";
    }
    if (CSaleOrder::IsLocked($ID, $lockedBY, $dateLock)) {
        $errorMessage .= str_replace("#DATE#", "{$dateLock}", str_replace("#ID#", "{$lockedBY}", GetMessage("SOE_ORDER_LOCKED"))) . ". ";
    }
    if (!$customTabber->Check()) {
        if ($ex = $APPLICATION->GetException()) {
            $errorMessage .= $ex->GetString();
        } else {
            $errorMessage .= "Error. ";
        }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:order_edit.php

示例12: tasksFormatDate

function tasksFormatDate($in_date)
{
    $date = $in_date;
    $strDate = false;
    if (!is_int($in_date)) {
        $date = MakeTimeStamp($in_date);
    }
    if ($date === false || $date === -1 || $date === 0) {
        $date = MakeTimeStamp($in_date);
    }
    // It can be other date on server (relative to client), ...
    $bTzWasDisabled = !CTimeZone::enabled();
    if ($bTzWasDisabled) {
        CTimeZone::enable();
    }
    $ts = time() + CTimeZone::getOffset();
    // ... so shift cur timestamp to compensate it.
    if ($bTzWasDisabled) {
        CTimeZone::disable();
    }
    $curDateStrAtClient = date('d.m.Y', $ts);
    $yesterdayDateStrAtClient = date('d.m.Y', strtotime('-1 day', $ts));
    if ($curDateStrAtClient === date('d.m.Y', $date)) {
        $strDate = FormatDate("today", $date);
    } elseif ($yesterdayDateStrAtClient === date('d.m.Y', $date)) {
        $strDate = FormatDate("yesterday", $date);
    } else {
        if (defined('FORMAT_DATE')) {
            $strDate = FormatDate(CDatabase::DateFormatToPHP(FORMAT_DATE), $date);
        } else {
            $strDate = FormatDate("d.m.Y", $date);
        }
    }
    return $strDate;
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:35,代码来源:tools.php

示例13: Date

</table>
<br>

<!-- Покажем список пользователей, которые сейчас на сайте -->
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="forumborder"><tr><td>
<table border="0" cellpadding="1" cellspacing="1" width="100%">
	<tr class="forumhead">
		<td valign="top" class="forumtitletext">
			Сейчас на форуме пользователи
		</td>
	</tr>
	<tr class="forumbody">
		<td valign="top" class="forumbodytext">
		<?php 
    $boundary_time = 10 * 60;
    $boundary_date = Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG)), time() - $boundary_time);
    $db_cur_users = CForumUser::GetList(array("LAST_VISIT" => "DESC"), array(">=LAST_VISIT" => $boundary_date, "HIDE_FROM_ONLINE" => "N"));
    $b_need_comma = False;
    while ($ar_cur_users = $db_cur_users->Fetch()) {
        if ($b_need_comma) {
            echo ", ";
        }
        $str_cur_name = "";
        if ($ar_cur_users["SHOW_NAME"] == "Y") {
            $str_cur_name = Trim($ar_cur_users["NAME"]);
            if (strlen($ar_cur_users["LAST_NAME"]) > 0) {
                if (strlen($str_cur_name) > 0) {
                    $str_cur_name .= " ";
                }
                $str_cur_name .= Trim($ar_cur_users["LAST_NAME"]);
            }
开发者ID:,项目名称:,代码行数:31,代码来源:

示例14: array_merge

        }
    }
    $arDirContent_t = array_merge($arDirs, $arFiles);
    $arDirContent = array();
    for ($i = 0, $l = count($arDirContent_t); $i < $l; $i++) {
        $Elem = $arDirContent_t[$i];
        $arPath = array($site, $Elem['ABS_PATH']);
        if ($Elem["TYPE"] == "F" && !$USER->CanDoFileOperation('fm_view_file', $arPath) || $Elem["TYPE"] == "D" && !$USER->CanDoFileOperation('fm_view_listing', $arPath) || $Elem["TYPE"] == "F" && $Elem["NAME"] == ".section.php") {
            continue;
        }
        $arDirContent[] = $Elem;
    }
    unset($arDirContent_t);
} else {
    $arDirContent = array();
    $date_format = CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL"));
    //CUtil::JSPostUnescape(); http://jabber.bx/view.php?id=32552
    if (isset($_POST['sres']) && CFilemanSearch::CheckSearchSess($searchSess)) {
        $searchRes = CFilemanSearch::SetSearchResult($_POST['sres'], $searchSess);
    } else {
        $searchRes = CFilemanSearch::GetSearchResult($searchSess, array($by, $order));
    }
    for ($i = 0, $l = count($searchRes); $i < $l; $i++) {
        $elPath = $searchRes[$i]['path'];
        $fullPath = $_SERVER["DOCUMENT_ROOT"] . $elPath;
        $bIsDir = $io->DirectoryExists($fullPath);
        $arPerm = $APPLICATION->GetFileAccessPermission(array($site, $elPath), $USER->GetUserGroupArray(), true);
        $arEl = array("PATH" => $fullPath, "ABS_PATH" => $elPath, "NAME" => CFileman::GetFileName($elPath), "PERMISSION" => $arPerm[0], "TIMESTAMP" => $searchRes[$i]['time'], "DATE" => date($date_format, $searchRes[$i]['time']), "SIZE" => $bIsDir ? 0 : $searchRes[$i]['size'], "TYPE" => $bIsDir ? "D" : "F");
        if (count($arPerm[1]) > 0) {
            $arEl["PERMISSION_EX"] = $arPerm[1];
        }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:fileman_admin.php

示例15: CleanUp

 public static function CleanUp($period = 48)
 {
     global $DB;
     $period = intVal($period) * 3600;
     $date = $DB->CharToDateFunction($DB->ForSql(Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANGUAGE_ID)), time() - $period)), "FULL");
     $strSQL = "DELETE FROM b_forum_stat\n\t\t\t\t\tWHERE (LAST_VISIT\n\t\t\t\t\t< " . $date . ")";
     $DB->Query($strSQL, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
     return "CForumStat::CleanUp();";
 }
开发者ID:rasuldev,项目名称:torino,代码行数:9,代码来源:user.php


注:本文中的CDatabase::DateFormatToPHP方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。