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


PHP CDatabase::FormatDate方法代码示例

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


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

示例1: ConvertFromDB

 public static function ConvertFromDB($arProperty, $value)
 {
     if (strlen($value["VALUE"]) > 0) {
         $value["VALUE"] = CDatabase::FormatDate($value["VALUE"], "YYYY-MM-DD", CLang::GetDateFormat("SHORT"));
     }
     return $value;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:7,代码来源:prop_date.php

示例2: GetEditFormHTML

 function GetEditFormHTML($arUserField, $arHtmlControl)
 {
     $arHtmlControl["VALIGN"] = "middle";
     if ($arUserField["EDIT_IN_LIST"] == "Y") {
         if ($arUserField["ENTITY_VALUE_ID"] < 1 && $arUserField["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] != "NONE") {
             if ($arUserField["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] == "NOW") {
                 $arHtmlControl["VALUE"] = ConvertTimeStamp(time() + CTimeZone::GetOffset(), "FULL");
             } else {
                 $arHtmlControl["VALUE"] = str_replace(" 00:00:00", "", CDatabase::FormatDate($arUserField["SETTINGS"]["DEFAULT_VALUE"]["VALUE"], "YYYY-MM-DD HH:MI:SS", CLang::GetDateFormat("FULL")));
             }
         }
         return CAdminCalendar::CalendarDate($arHtmlControl["NAME"], $arHtmlControl["VALUE"], 20, true);
     } elseif (strlen($arHtmlControl["VALUE"]) > 0) {
         return $arHtmlControl["VALUE"];
     } else {
         return '&nbsp;';
     }
 }
开发者ID:spas-viktor,项目名称:books,代码行数:18,代码来源:usertypetime.php

示例3: GetEditFormHTML

 function GetEditFormHTML($arUserField, $arHtmlControl)
 {
     $arHtmlControl["VALIGN"] = "middle";
     if ($arUserField["EDIT_IN_LIST"] == "Y") {
         if ($arUserField["ENTITY_VALUE_ID"] < 1 && $arUserField["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] != "NONE") {
             if ($arUserField["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] == "NOW") {
                 $arHtmlControl["VALUE"] = ConvertTimeStamp(time(), "SHORT");
             } else {
                 $arHtmlControl["VALUE"] = CDatabase::FormatDate($arUserField["SETTINGS"]["DEFAULT_VALUE"]["VALUE"], "YYYY-MM-DD", CLang::GetDateFormat("SHORT"));
             }
         }
         return CAdminCalendar::CalendarDate($arHtmlControl["NAME"], $arHtmlControl["VALUE"]);
     } elseif (strlen($arHtmlControl["VALUE"]) > 0) {
         return $arHtmlControl["VALUE"];
     } else {
         return '&nbsp;';
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:18,代码来源:usertypedate.php

示例4: CharToDateFunction

 function CharToDateFunction($value, $format_type = "FULL", $lang = false)
 {
     $value = trim($value);
     if (strlen($value) <= 0) {
         return "NULL";
     }
     $value = CDatabase::FormatDate($value, CLang::GetDateFormat($format_type, $lang), "YYYY-MM-DD HH:MI:SS");
     return "convert (datetime, '" . $this->ForSql($value) . "', 120)";
 }
开发者ID:,项目名称:,代码行数:9,代码来源:

示例5: AddOrderHistory

 public function AddOrderHistory($OldFields, $NewFields)
 {
     global $DB, $USER;
     foreach (GetModuleEvents("sale", "OnBeforeOrderAddHistory", true) as $arEvent) {
         if (ExecuteModuleEventEx($arEvent, array(&$NewFields)) === false) {
             return false;
         }
     }
     if ($OldFields["ID"] <= 0) {
         return false;
     }
     if (isset($NewFields["ID"])) {
         unset($NewFields["ID"]);
     }
     $bChange = false;
     $strSql = '';
     $arInsert = array("H_USER_ID" => $USER->GetID(), "H_ORDER_ID" => $OldFields["ID"], "H_CURRENCY" => $OldFields["CURRENCY"]);
     $arDeleteFields = array("ID", "EMP_CANCELED_ID", "EMP_MARKED_ID", "EMP_DEDUCTED_ID", "EMP_STATUS_ID", "EMP_ALLOW_DELIVERY_ID", "LOCKED_BY", "DATE_LOCK", "UPDATED_1C", "DATE_INSERT", "DATE_UPDATE", "USER_DESCRIPTION", "ADDITIONAL_INFO", "COMMENTS", "RECOUNT_FLAG", "RECURRING_ID");
     foreach ($NewFields as $key => $val) {
         if ($key == "PAY_VOUCHER_DATE" || $key == "DELIVERY_DOC_DATE") {
             $valOld = $val;
             $val = CDatabase::FormatDate(trim($val), false, "Y-M-D");
         }
         if (array_key_exists($key, $OldFields) && strlen($val) > 0 && $val != $OldFields[$key] && !in_array($key, $arDeleteFields)) {
             if ($key == "PAY_VOUCHER_DATE" || $key == "DELIVERY_DOC_DATE") {
                 $val = $valOld;
             }
             $bChange = true;
             $arInsert[$key] = $val;
         }
     }
     if ($bChange) {
         $arPrepare = $DB->PrepareInsert("b_sale_order_history", $arInsert);
         $arPrepare[0] .= ", H_DATE_INSERT";
         $arPrepare[1] .= ", " . $DB->GetNowFunction();
         $strSql = "INSERT INTO b_sale_order_history (" . $arPrepare[0] . ") " . "VALUES (" . $arPrepare[1] . ");";
         $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
     }
     foreach (GetModuleEvents("sale", "OnAfterOrderAddHistory", true) as $arEvent) {
         ExecuteModuleEventEx($arEvent, array($NewFields));
     }
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:43,代码来源:order.php

示例6: foreach

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
?>
<div class="fields integer" id="main_<?php 
echo $arParams["arUserField"]["FIELD_NAME"];
?>
"><?php 
$index = 0;
$fIndex = $arResult["RANDOM"];
foreach ($arResult["VALUE"] as $res) {
    if ($index == 0 && $arParams["arUserField"]["ENTITY_VALUE_ID"] < 1 && $arParams["arUserField"]["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] != "NONE") {
        if ($arParams["arUserField"]["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] == "NOW") {
            $res = ConvertTimeStamp(time() + CTimeZone::GetOffset(), "FULL");
        } else {
            $res = str_replace(" 00:00:00", "", CDatabase::FormatDate($arParams["arUserField"]["SETTINGS"]["DEFAULT_VALUE"]["VALUE"], "YYYY-MM-DD HH:MI:SS", CLang::GetDateFormat("FULL")));
        }
    }
    $name = $arParams["arUserField"]["FIELD_NAME"];
    if ($arParams["arUserField"]["MULTIPLE"] == "Y") {
        $name = $arParams["arUserField"]["~FIELD_NAME"] . "[" . $index . "]";
    }
    ?>
<div class="fields datetime">
<input type="text" name="<?php 
    echo $name;
    ?>
" value="<?php 
    echo $res;
    ?>
"<?php 
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:template.php

示例7: Authorize

 public function Authorize()
 {
     global $APPLICATION, $USER;
     $errorCode = 1;
     if ($arOpenID = $this->Validate()) {
         $arFields = array('EXTERNAL_AUTH_ID' => 'OPENID#' . $arOpenID['server'], 'XML_ID' => $arOpenID['identity'], 'PASSWORD' => randString(30), 'LID' => SITE_ID, "PERSONAL_WWW" => $arOpenID['identity']);
         if (array_key_exists('openid_sreg_email', $_GET)) {
             $arFields['EMAIL'] = $_GET['openid_sreg_email'];
         }
         if (array_key_exists('openid_sreg_gender', $_GET) && ($_GET['openid_sreg_gender'] == 'M' || $_GET['openid_sreg_gender'] == 'F')) {
             $arFields['PERSONAL_GENDER'] = $_GET['openid_sreg_gender'];
         }
         if (array_key_exists('openid_sreg_fullname', $_GET)) {
             $fullname = defined("BX_UTF") ? $_GET['openid_sreg_fullname'] : CharsetConverter::ConvertCharset($_GET['openid_sreg_fullname'], 'UTF-8', LANG_CHARSET);
             $fullname = trim($fullname);
             if (($pos = strpos($fullname, ' ')) !== false) {
                 $arFields['NAME'] = substr($fullname, 0, $pos);
                 $arFields['LAST_NAME'] = substr($fullname, $pos + 1);
             } else {
                 $arFields['NAME'] = $fullname;
             }
         }
         if (array_key_exists('openid_sreg_postcode', $_GET)) {
             $arFields['PERSONAL_ZIP'] = $_GET['openid_sreg_postcode'];
         }
         if (array_key_exists('openid_sreg_timezone', $_GET)) {
             $arFields['TIME_ZONE'] = $_GET['openid_sreg_timezone'];
         }
         if (array_key_exists('openid_sreg_country', $_GET)) {
             $arFields['PERSONAL_COUNTRY'] = GetCountryIdByCode($_GET['openid_sreg_country']);
         }
         if (array_key_exists('openid_sreg_dob', $_GET)) {
             $arFields['PERSONAL_BIRTHDAY'] = CDatabase::FormatDate($_GET['openid_sreg_dob'], "YYYY-MM-DD", FORMAT_DATE);
         }
         if (array_key_exists('BX_OPENID_IDENTITY', $_SESSION)) {
             $arFields['LOGIN'] = $_SESSION['BX_OPENID_IDENTITY'];
         } else {
             $arFields['LOGIN'] = $arOpenID['identity'];
         }
         $arFields['LOGIN'] = preg_replace("#^(http://|https://)#i", "", $arFields['LOGIN']);
         $USER_ID = 0;
         if ($GLOBALS["USER"]->IsAuthorized() && $GLOBALS["USER"]->GetID()) {
             if (!CSocServAuth::isSplitDenied()) {
                 $arFields['USER_ID'] = $GLOBALS["USER"]->GetID();
                 CSocServAuthDB::Add($arFields);
                 self::CleanParam();
             } else {
                 $errorCode = SOCSERV_REGISTRATION_DENY;
             }
         } else {
             $dbUsersOld = $GLOBALS["USER"]->GetList($by, $ord, array('XML_ID' => $arFields['XML_ID'], 'EXTERNAL_AUTH_ID' => $arFields['EXTERNAL_AUTH_ID'], 'ACTIVE' => 'Y'), array('NAV_PARAMS' => array("nTopCount" => "1")));
             $dbUsersNew = $GLOBALS["USER"]->GetList($by, $ord, array('XML_ID' => $arFields['XML_ID'], 'EXTERNAL_AUTH_ID' => 'socservices', 'ACTIVE' => 'Y'), array('NAV_PARAMS' => array("nTopCount" => "1")));
             $dbSocUser = CSocServAuthDB::GetList(array(), array('XML_ID' => $arFields['XML_ID'], 'EXTERNAL_AUTH_ID' => $arFields['EXTERNAL_AUTH_ID']), false, false, array("USER_ID", "ACTIVE"));
             if ($arUser = $dbSocUser->Fetch()) {
                 if ($arUser["ACTIVE"] === 'Y') {
                     $USER_ID = $arUser["USER_ID"];
                 }
             } elseif ($arUser = $dbUsersOld->Fetch()) {
                 $USER_ID = $arUser['ID'];
             } elseif ($arUser = $dbUsersNew->Fetch()) {
                 $USER_ID = $arUser["ID"];
             } elseif (COption::GetOptionString("main", "new_user_registration", "N") == "Y") {
                 $def_group = COption::GetOptionString('main', 'new_user_registration_def_group', '');
                 if ($def_group != '') {
                     $arFields['GROUP_ID'] = explode(',', $def_group);
                 }
                 if (!empty($arFields['GROUP_ID']) && CSocServAuth::isAuthDenied($arFields['GROUP_ID'])) {
                     $errorCode = SOCSERV_REGISTRATION_DENY;
                 } else {
                     foreach (GetModuleEvents("main", "OnBeforeOpenIDUserAdd", true) as $arEvent) {
                         ExecuteModuleEventEx($arEvent, array($arFields));
                     }
                     $arFieldsUser = $arFields;
                     $arFieldsUser["EXTERNAL_AUTH_ID"] = "socservices";
                     if (!($USER_ID = $GLOBALS["USER"]->Add($arFieldsUser))) {
                         return false;
                     }
                     $arFields['CAN_DELETE'] = 'N';
                     $arFields['USER_ID'] = $USER_ID;
                     CSocServAuthDB::Add($arFields);
                     unset($arFields['CAN_DELETE']);
                 }
             } elseif (COption::GetOptionString("main", "new_user_registration", "N") == "N") {
                 $errorCode = 2;
             }
             if (intval($USER_ID) > 0) {
                 $arGroups = $USER->GetUserGroup($USER_ID);
                 if (CSocServAuth::isAuthDenied($arGroups)) {
                     $errorCode = SOCSERV_AUTHORISATION_ERROR;
                 } else {
                     $USER->AuthorizeWithOtp($USER_ID);
                     $arKillParams = array("auth_service_id", "check_key");
                     foreach (array_keys($_GET) as $k) {
                         if (strpos($k, 'openid_') === 0) {
                             $arKillParams[] = $k;
                         }
                     }
                     $redirect_url = $APPLICATION->GetCurPageParam('', $arKillParams, false);
                     foreach (GetModuleEvents("main", "OnBeforeOpenIDAuthFinalRedirect", true) as $arEvent) {
                         ExecuteModuleEventEx($arEvent, array($redirect_url, $USER_ID, $arFields));
//.........这里部分代码省略.........
开发者ID:rasuldev,项目名称:torino,代码行数:101,代码来源:openidclient.php

示例8: htmlspecialcharsbx

		echo $str;?></td>
		<td ondblclick="<?echo htmlspecialcharsbx("DoAction(event, 'version_down', 'main')")?>" id="version_for_main">0.1</td>
		<td nowrap>xxx</td>
		<td><?php 
echo GetMessage("MOD_INSTALLED");
?>
</td>
		<td>&nbsp;</td>
	</tr>
<?
foreach($arModules as $info) :
?>
	<tr>
		<td><b><?echo htmlspecialcharsex($info["MODULE_NAME"])?></b> <?echo htmlspecialcharsex(strlen($info["MODULE_PARTNER"]) > 0? " <b><i>(".str_replace(array("#NAME#", "#URI#"), array($info["MODULE_PARTNER"], $info["MODULE_PARTNER_URI"]), GetMessage("MOD_PARTNER_NAME")).")</i></b>" : "(".$info["MODULE_ID"].")") ?><br><?echo $info["MODULE_DESCRIPTION"]?></td>
		<td ondblclick="<?echo htmlspecialcharsbx("DoAction(event, 'version_down', '".CUtil::AddSlashes($info["MODULE_ID"])."')")?>" id="version_for_<?echo htmlspecialcharsbx($info["MODULE_ID"])?>"><?echo $info["MODULE_VERSION"]?></td>
		<td nowrap><?echo CDatabase::FormatDate($info["MODULE_VERSION_DATE"], "YYYY-MM-DD HH:MI:SS", CLang::GetDateFormat("SHORT"));?></td>
		<td nowrap><?if($info["IsInstalled"]):?><?echo GetMessage("MOD_INSTALLED")?><?else:?><span class="required"><?echo GetMessage("MOD_NOT_INSTALLED")?></span><?endif?></td>
		<td>
			<form action="<?echo $APPLICATION->GetCurPage()?>" method="GET" id="form_for_<?echo htmlspecialcharsbx($info["MODULE_ID"])?>">
				<input type="hidden" name="action" value="" id="action_for_<?echo htmlspecialcharsbx($info["MODULE_ID"])?>">
				<input type="hidden" name="lang" value="<?echo LANG?>">
				<input type="hidden" name="id" value="<?echo htmlspecialcharsbx($info["MODULE_ID"])?>">
				<?php 
echo freetrix_sessid_post();
?>
				<?if($info["IsInstalled"]):?>
					<input <?if (!$isAdmin || $info["MODULE_ID"] == 'fileman' || $info["MODULE_ID"] == 'intranet') echo "disabled" ?> type="submit" name="uninstall" value="<?echo GetMessage("MOD_DELETE")?>">
				<?else:?>
					<input <?if (!$isAdmin) echo "disabled" ?> type="submit" class="adm-btn-green" name="install" value="<?echo GetMessage("MOD_INSTALL_BUTTON")?>">
				<?endif?>
			</form>
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:module_admin.php

示例9: time

    die;
}
?>

<div class="fields integer" id="main_<?php 
echo $arParams["arUserField"]["FIELD_NAME"];
?>
"><?php 
$index = 0;
$fIndex = time();
foreach ($arResult["VALUE"] as $res) {
    if ($index == 0 && $arParams["arUserField"]["ENTITY_VALUE_ID"] < 1 && $arParams["arUserField"]["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] != "NONE") {
        if ($arParams["arUserField"]["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] == "NOW") {
            $res = ConvertTimeStamp(time(), "SHORT");
        } else {
            $res = CDatabase::FormatDate($arParams["arUserField"]["SETTINGS"]["DEFAULT_VALUE"]["VALUE"], "YYYY-MM-DD", CLang::GetDateFormat("SHORT"));
        }
    }
    $name = $arParams["arUserField"]["FIELD_NAME"];
    if ($arParams["arUserField"]["MULTIPLE"] == "Y") {
        $name = $arParams["arUserField"]["~FIELD_NAME"] . "[" . $index . "]";
    }
    ?>
<div class="fields datetime">
<input type="text" name="<?php 
    echo $name;
    ?>
" value="<?php 
    echo $res;
    ?>
"<?php 
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:template.php

示例10: elseif

         } elseif ($arDocumentFields[$newKey]["BaseType"] == "user") {
             $value = CBPHelper::UsersStringToArray($value, $documentType, $arErrors);
             if (is_array($value) && count($value) > 0) {
                 $value = $value[0];
             }
             if (substr($value, 0, strlen("user_")) == "user_") {
                 $value = substr($value, strlen("user_"));
             }
         } elseif ($arDocumentFields[$newKey]["BaseType"] == "datetime" && strlen($value) > 0 && CheckDateTime($value)) {
             $isShort = strlen(trim($value)) <= 10;
             $appendTime = $op == '<=' ? '23:59:59' : '00:00:00';
             if (strpos($newKey, 'PROPERTY_') === 0) {
                 if ($timeZoneOffset != 0) {
                     $value = date("Y-m-d " . ($isShort ? $appendTime : 'H:i:s'), MakeTimeStamp($value, CLang::GetDateFormat("FULL")) - $timeZoneOffset);
                 } else {
                     $value = CDatabase::FormatDate($value, CLang::GetDateFormat("FULL"), "YYYY-MM-DD " . ($isShort ? $appendTime : 'HH:MI:SS'));
                 }
             } elseif ($isShort) {
                 $value .= ' ' . $appendTime;
             }
         }
         if ($newKey == "ACTIVE_FROM") {
             $newKey = "DATE_ACTIVE_FROM";
         }
         if ($newKey == "ACTIVE_TO") {
             $newKey = "DATE_ACTIVE_TO";
         }
         $arFilter[$op . $newKey] = $value;
     }
 }
 $arResult["SORT"] = $gridSort["sort"];
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例11: __InTaskCompare

 function __InTaskCompare($arTask1, $arTask2, $arOrder)
 {
     foreach ($arOrder as $ord) {
         if (Array_Key_Exists($ord["ORDER"], $arTask1["FIELDS"])) {
             $v1 = $arTask1["FIELDS"][$ord["ORDER"]];
             $v2 = $arTask2["FIELDS"][$ord["ORDER"]];
             if ($ord["TYPE"] == "datetime") {
                 $v1 = CDatabase::FormatDate($v1, CLang::GetDateFormat("FULL"), "YYYY-MM-DD HH:MI:SS");
                 $v2 = CDatabase::FormatDate($v2, CLang::GetDateFormat("FULL"), "YYYY-MM-DD HH:MI:SS");
             }
             if ($ord["NULLS"]) {
                 if (StrLen($v1) <= 0 && StrLen($v2) > 0) {
                     return $ord["DIRECTION"] == "ASC" ? true : false;
                 } elseif (StrLen($v1) > 0 && StrLen($v2) <= 0) {
                     return $ord["DIRECTION"] == "ASC" ? false : true;
                 }
             }
             if ($v1 > $v2) {
                 return $ord["DIRECTION"] == "ASC" ? true : false;
             } elseif ($v1 < $v2) {
                 return $ord["DIRECTION"] == "ASC" ? false : true;
             }
         } else {
             foreach ($arTask1["PROPS"] as $key => $value) {
                 if (StrToUpper($key) == $ord["ORDER"]) {
                     $v1 = $value["VALUE"];
                     $v2 = $arTask2["PROPS"][$key]["VALUE"];
                     if ($ord["TYPE"] == "datetime") {
                         $v1 = CDatabase::FormatDate($v1, CLang::GetDateFormat("FULL"), "YYYY-MM-DD HH:MI:SS");
                         $v2 = CDatabase::FormatDate($v2, CLang::GetDateFormat("FULL"), "YYYY-MM-DD HH:MI:SS");
                     }
                     if ($ord["NULLS"]) {
                         if (StrLen($v1) <= 0 && StrLen($v2) > 0) {
                             return $ord["DIRECTION"] == "ASC" ? true : false;
                         } elseif (StrLen($v1) > 0 && StrLen($v2) <= 0) {
                             return $ord["DIRECTION"] == "ASC" ? false : true;
                         }
                     }
                     if ($v1 > $v2) {
                         return $ord["DIRECTION"] == "ASC" ? true : false;
                     } elseif ($v1 < $v2) {
                         return $ord["DIRECTION"] == "ASC" ? false : true;
                     }
                     break;
                 }
             }
         }
     }
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:50,代码来源:init.php

示例12: IncludeModuleLangFile

/* - product XML_ID (with mnemonic code PRODUCT.XML_ID).                    */
/****************************************************************************/
$SALER_COMPANY_XML_ID = "1";
IncludeModuleLangFile(__FILE__);
if (!isset($arFilter) || !is_array($arFilter)) {
    die("Wrong use 1");
}
$dbOrderList = CSaleOrder::GetList(array($by => $order), $arFilter, false, false, array("ID", "LID", "PERSON_TYPE_ID", "PAYED", "DATE_PAYED", "EMP_PAYED_ID", "CANCELED", "DATE_CANCELED", "EMP_CANCELED_ID", "REASON_CANCELED", "STATUS_ID", "DATE_STATUS", "PAY_VOUCHER_NUM", "PAY_VOUCHER_DATE", "EMP_STATUS_ID", "PRICE_DELIVERY", "ALLOW_DELIVERY", "DATE_ALLOW_DELIVERY", "EMP_ALLOW_DELIVERY_ID", "PRICE", "CURRENCY", "DISCOUNT_VALUE", "SUM_PAID", "USER_ID", "PAY_SYSTEM_ID", "DELIVERY_ID", "DATE_INSERT", "DATE_INSERT_FORMAT", "DATE_UPDATE", "USER_DESCRIPTION", "ADDITIONAL_INFO", "PS_STATUS", "PS_STATUS_CODE", "PS_STATUS_DESCRIPTION", "PS_STATUS_MESSAGE", "PS_SUM", "PS_CURRENCY", "PS_RESPONSE_DATE", "COMMENTS", "TAX_VALUE", "STAT_GID", "RECURRING_ID"));
ob_start();
echo "<" . "?xml version=\"1.0\" encoding=\"" . LANG_CHARSET . "\"?" . ">\n";
echo "<BizTalk xmlns=\"urn:schemas-biztalk-org:biztalk/biztalk-0.81.xml\"><Route><From locationID=\"\" locationType=\"\" process=\"\" path=\"\" handle=\"\"/><To locationID=\"\" locationType=\"\" process=\"\" path=\"\" handle=\"\"/></Route><Body>\n";
echo "\t<" . GetMessage("CommerceInfo") . " xmlns=\"urn:CommerceML\">\n";
$arContra = array();
while ($dbOrderList->NavNext(true, "f_")) {
    echo "\t\t<" . GetMessage("Document") . " " . GetMessage("Operation") . "=\"Order\" " . GetMessage("NumberDoc") . "=\"" . $f_ID . "\" ";
    echo "" . GetMessage("DateDoc") . "=\"" . CDatabase::FormatDate($f_DATE_INSERT, CLang::GetDateFormat("FULL", LANG), "Y-M-D") . "\" " . GetMessage("TimeDoc") . "=\"" . CDatabase::FormatDate($f_DATE_INSERT, CLang::GetDateFormat("FULL", LANG), "HH:MI:SS") . "\" " . GetMessage("PaymentDate") . "=\"\" ";
    echo "" . GetMessage("Sum") . "=\"" . $f_PRICE . "\" " . GetMessage("Comment") . "=\"\" " . GetMessage("Currency") . "=\"" . $f_CURRENCY . "\">\n";
    echo "\t\t\t<" . GetMessage("CompanyInDocument") . " " . GetMessage("Role") . "=\"Saler\" " . GetMessage("Company") . "=\"" . $SALER_COMPANY_XML_ID . "\"/>\n";
    echo "\t\t\t<" . GetMessage("CompanyInDocument") . " " . GetMessage("Role") . "=\"Buyer\" " . GetMessage("Company") . "=\"BC" . $f_USER_ID . "\"/>\n";
    $dbOrderTax = CSaleOrderTax::GetList(array(), array("ORDER_ID" => $f_ID), false, false, array("ID", "TAX_NAME", "VALUE", "VALUE_MONEY", "CODE", "IS_IN_PRICE"));
    while ($arOrderTax = $dbOrderTax->Fetch()) {
        echo "\t\t\t<" . GetMessage("TaxSum") . " " . GetMessage("Tax") . "=\"" . htmlspecialcharsbx($arOrderTax["TAX_NAME"]) . "\" " . GetMessage("TaxRate") . "=\"" . htmlspecialcharsbx($arOrderTax["VALUE"]) . "\" " . GetMessage("Sum") . "=\"" . htmlspecialcharsbx($arOrderTax["VALUE_MONEY"]) . "\" " . GetMessage("IncludedInSum") . "=\"" . ($arOrderTax["IS_IN_PRICE"] == "Y" ? 1 : 0) . "\"/>\n";
    }
    $dbBasket = CSaleBasket::GetList(array("NAME" => "ASC"), array("ORDER_ID" => $f_ID));
    while ($arBasket = $dbBasket->Fetch()) {
        $CATALOG_XML_ID = $arBasket["CATALOG_XML_ID"];
        $PRODUCT_XML_ID = $arBasket["PRODUCT_XML_ID"];
        if (strlen($PRODUCT_XML_ID) <= 0 && strlen($CATALOG_XML_ID) <= 0) {
            $dbBasketProps = CSaleBasket::GetPropsList(array("CODE" => "ASC"), array("BASKET_ID" => $arBasket["ID"]));
            while ($arBasketProps = $dbBasketProps->Fetch()) {
                if ($arBasketProps["CODE"] == "CATALOG.XML_ID") {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:commerceml.php

示例13: while

while ($arRes = $myData->GetNext()) {
    $arRes["STATUS"] = $status[$arRes["STATUS"]];
    $row =& $lAdmin->AddRow($arRes["ID"], $arRes);
    $StatusHTML = '<select name="FIELDS[' . $arRes["ID"] . '][STATUS]">';
    foreach ($status as $key => $value) {
        $selected = "";
        if ($key == $arRes["~STATUS"]) {
            $selected = "selected";
        }
        $StatusHTML .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
    }
    $StatusHTML .= '</select>';
    $row->AddEditField("STATUS", $StatusHTML);
    $row->AddViewField("ID", $arRes["ID"]);
    $row->AddInputField("NAME", array("SIZE" => "30"));
    $row->AddViewField("CREATED", CDatabase::FormatDate($f_DATETIME, "YYYY-MM-DD HH:MI:SS", CSite::GetDateFormat("FULL")));
    $row->AddInputField("PHONE", array("SIZE" => "30"));
    $sHTML = "<textarea cols='30' rows='4'name='FIELDS[" . $arRes["ID"] . "][USER_COMMENT]'>" . $arRes["USER_COMMENT"] . "</textarea>";
    $row->AddEditField("USER_COMMENT", $sHTML);
    $sHTML = "<textarea cols='30' rows='4'name='FIELDS[" . $arRes["ID"] . "][ADMIN_COMMENT]'>" . $arRes["ADMIN_COMMENT"] . "</textarea>";
    $row->AddEditField("ADMIN_COMMENT", $sHTML);
    //echo "<pre style='display: none'>";
    //print_r($arRes);
    //echo "</pre>";
    $arActions = array();
    $arActions[] = array("ICON" => "edit", "TEXT" => GetMessage("EDIT"), "ACTION" => $lAdmin->ActionRedirect("softbalance_callback_edit.php?ID=" . urlencode($arRes["ID"]) . '&amp;lang=' . LANGUAGE_ID), "DEFAULT" => true);
    $arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("DELETE"), "ACTION" => "if(confirm('" . GetMessageJS("DELETE_CONF") . "')) " . $lAdmin->ActionDoGroup($arRes["ID"], "delete"));
    $row->AddActions($arActions);
}
$lAdmin->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $myData->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
$lAdmin->AddGroupActionTable(array("delete" => GetMessage("MAIN_ADMIN_LIST_DELETE")));
开发者ID:ASDAFF,项目名称:callback.form,代码行数:31,代码来源:list.php

示例14: array

     $arResult['FIELD']['IB_IBLOCK_ID'] = $arResult['FIELD']['SETTINGS']['IBLOCK_ID'];
     $arResult['FIELD']['IB_DEFAULT_VALUE'] = $arResult['FIELD']['SETTINGS']['DEFAULT_VALUE'];
     $arResult['FIELD']['IB_DISPLAY'] = $arResult['FIELD']['SETTINGS']['DISPLAY'];
     $arResult['FIELD']['IB_LIST_HEIGHT'] = $arResult['FIELD']['SETTINGS']['LIST_HEIGHT'];
     $arResult['FIELD']['IB_ACTIVE_FILTER'] = $arResult['FIELD']['SETTINGS']['ACTIVE_FILTER'] == 'Y' ? 'Y' : 'N';
     break;
 case 'iblock_element':
     $arResult['FIELD']['IB_IBLOCK_TYPE_ID'] = $arResult['FIELD']['SETTINGS']['IBLOCK_TYPE_ID'];
     $arResult['FIELD']['IB_IBLOCK_ID'] = $arResult['FIELD']['SETTINGS']['IBLOCK_ID'];
     $arResult['FIELD']['IB_DEFAULT_VALUE'] = $arResult['FIELD']['SETTINGS']['DEFAULT_VALUE'];
     $arResult['FIELD']['IB_DISPLAY'] = $arResult['FIELD']['SETTINGS']['DISPLAY'];
     $arResult['FIELD']['IB_LIST_HEIGHT'] = $arResult['FIELD']['SETTINGS']['LIST_HEIGHT'];
     $arResult['FIELD']['IB_ACTIVE_FILTER'] = $arResult['FIELD']['SETTINGS']['ACTIVE_FILTER'] == 'Y' ? 'Y' : 'N';
     break;
 case 'datetime':
     $arResult['FIELD']['DT_DEFAULT_VALUE'] = CDatabase::FormatDate($arResult['FIELD']['SETTINGS']['DEFAULT_VALUE']['VALUE'], 'YYYY-MM-DD HH:MI:SS', CLang::GetDateFormat('FULL'));
     $arResult['FIELD']['DT_TYPE'] = $arResult['FIELD']['SETTINGS']['DEFAULT_VALUE']['TYPE'];
     break;
 case 'enumeration':
     $arResult['LIST'] = array();
     $arResult['LIST_DEF'] = array();
     if (is_callable(array($arResult['FIELD']['USER_TYPE']['CLASS_NAME'], 'GetList'))) {
         $rsEnum = call_user_func_array(array($arResult['FIELD']['USER_TYPE']['CLASS_NAME'], 'GetList'), array($arResult['FIELD']));
         while ($ar = $rsEnum->GetNext()) {
             $arResult['LIST'][$ar['ID']] = $ar;
             if ($ar['DEF'] == 'Y') {
                 $arResult['LIST_DEF'][$ar['ID']] = true;
             }
         }
     }
     $arResult['LIST'][] = array('ID' => 'n0', 'SORT' => 500, 'NAME' => '');
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例15: Authorize

	function Authorize()
	{
		global $APPLICATION, $USER;

		if ($arOpenID = $this->Validate())
		{
			$arFields = array(
				'EXTERNAL_AUTH_ID' => 'OPENID#' . $arOpenID['server'],
				'XML_ID' => $arOpenID['identity'],
				'PASSWORD' => randString(30),
				'LID' => SITE_ID,
			);
			if (array_key_exists('openid_sreg_email', $_GET))
				$arFields['EMAIL'] = $_GET['openid_sreg_email'];

			if (array_key_exists('openid_sreg_gender', $_GET) && ($_GET['openid_sreg_gender'] == 'M' || $_GET['openid_sreg_gender'] == 'F'))
				$arFields['PERSONAL_GENDER'] = $_GET['openid_sreg_gender'];

			if (array_key_exists('openid_sreg_fullname', $_GET))
			{
				if(!defined("BX_UTF"))
					$fullname = CharsetConverter::ConvertCharset($_GET['openid_sreg_fullname'], 'UTF-8', LANG_CHARSET);

				$fullname = trim($fullname);
				if (($pos = strpos($fullname, ' ')) !== false)
				{
					$arFields['NAME'] = substr($fullname, 0, $pos);
					$arFields['LAST_NAME'] = substr($fullname, $pos + 1);
				}
				else
				{
					$arFields['NAME'] = $fullname;
				}
			}

			if (array_key_exists('openid_sreg_postcode', $_GET))
				$arFields['PERSONAL_ZIP'] = $_GET['openid_sreg_postcode'];

			if (array_key_exists('openid_sreg_timezone', $_GET))
				$arFields['TIME_ZONE'] = $_GET['openid_sreg_timezone'];

			if (array_key_exists('openid_sreg_country', $_GET))
				$arFields['PERSONAL_COUNTRY'] = GetCountryIdByCode($_GET['openid_sreg_country']);

			if (array_key_exists('openid_sreg_dob', $_GET))
				$arFields['PERSONAL_BIRTHDAY'] = CDatabase::FormatDate($_GET['openid_sreg_dob'], "YYYY-MM-DD", FORMAT_DATE);

			if (array_key_exists('BX_OPENID_IDENTITY', $_SESSION))
				$arFields['LOGIN'] = $_SESSION['BX_OPENID_IDENTITY'];
			else
				$arFields['LOGIN'] = $arOpenID['identity'];

			$arFields['LOGIN'] = preg_replace("#^(http://|https://)#i", "", $arFields['LOGIN']);

			$USER_ID = 0;

			$rsUsers = $USER->GetList($B, $O, array('XML_ID' => $arFields['XML_ID'], 'EXTERNAL_AUTH_ID' => $arFields['EXTERNAL_AUTH_ID']));
			if ($arUser = $rsUsers->Fetch())
			{
				$USER_ID = $arUser['ID'];
			}
			else
			{
				$def_group = COption::GetOptionString('main', 'new_user_registration_def_group', '');
				if($def_group != '')
					$arFields['GROUP_ID'] = explode(',', $def_group);

				$rsEvents = GetModuleEvents('main', 'OnBeforeOpenIDUserAdd');
				while ($arEvent = $rsEvents->Fetch())
					$arFields = ExecuteModuleEventEx($arEvent, array($arFields));

				if ( !($USER_ID = $USER->Add($arFields)) )
					return false;
			}
			if (intval($USER_ID) > 0)
			{
				$USER->Authorize($USER_ID);

				$arKillParams = array("auth_service_id");
				foreach (array_keys($_GET) as $k)
					if (strpos($k, 'openid_') === 0)
						$arKillParams[] = $k;

				$redirect_url = $APPLICATION->GetCurPageParam('', $arKillParams, false);

				$rsEvents = GetModuleEvents('main', 'OnBeforeOpenIDAuthFinalRedirect');
				while ($arEvent = $rsEvents->Fetch())
					$redirect_url = ExecuteModuleEventEx($arEvent, array($redirect_url, $USER_ID, $arFields));

				if ($redirect_url)
					LocalRedirect($redirect_url, true);

				return $USER_ID;
			}
		}
		return false;
	}
开发者ID:nProfessor,项目名称:Mytb,代码行数:97,代码来源:openidclient.php


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