本文整理汇总了PHP中CSaleOrder::IsLocked方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrder::IsLocked方法的具体用法?PHP CSaleOrder::IsLocked怎么用?PHP CSaleOrder::IsLocked使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleOrder
的用法示例。
在下文中一共展示了CSaleOrder::IsLocked方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: require
$APPLICATION->SetTitle(GetMessage("NEWO_TITLE_DEFAULT"));
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php");
CJSCore::Init('file_input');
$boolLocked = false;
$intLockUserID = 0;
$strLockUser = '';
$strLockUserExt = '';
$strLockUserInfo = '';
$strLockUserInfoExt = '';
$strLockTime = '';
$strNameFormat = CSite::GetNameFormat(true);
$boolLocked = CSaleOrder::IsLocked($ID, $intLockUserID, $strLockTime);
if ($boolLocked)
{
$strLockUser = $intLockUserID;
$strLockUserInfo = $intLockUserID;
$rsUsers = CUser::GetList(($by2 = 'ID'),($order2 = 'ASC'), array('ID' => $intLockUserID), array('FIELDS' => array('ID', 'LOGIN', 'NAME', 'LAST_NAME')));
if ($arOneUser = $rsUsers->Fetch())
{
$strLockUser = CUser::FormatName($strNameFormat, $arOneUser);
$strLockUserInfo = '<a href="/bitrix/admin/user_edit.php?lang='.LANGUAGE_ID.'&ID='.$intLockUserID.'">'.$strLockUser.'</a>';
}
$strLockUserExt = htmlspecialcharsbx(GetMessage(
'SOE_ORDER_LOCKED2',
array(
'#ID#' => $strLockUser,
'#DATE#' => $strLockTime,
示例2: GetMessage
"PERSON_TYPE_ID" => $arOrderList["PERSON_TYPE_ID"]
);
}
else
{
$arAffectedOrders[$arOrderList["ID"]] = $arOrderList;
}
}
}
foreach ($arID as $ID)
{
if (strlen($ID) <= 0)
continue;
if (CSaleOrder::IsLocked($ID, $lockedBY, $dateLock) && $_REQUEST['action'] != "unlock")
{
$lAdmin->AddGroupError(str_replace("#DATE#", "$dateLock", str_replace("#ID#", "$lockedBY", GetMessage("SOE_ORDER_LOCKED"))), $ID);
}
else
{
switch ($_REQUEST['action'])
{
case "delete":
$arItems = CSaleOrder::GetByID($ID);
if (count($arItems) > 1)
{
@set_time_limit(0);
if (CSaleOrder::CanUserDeleteOrder($ID, $arUserGroups, $intUserID))
{
示例3: LocalRedirect
if (!($arOrderOldTmp = $dbOrder->ExtractFields("str_"))) {
LocalRedirect("sale_order.php?lang=" . LANG . GetFilterParams("filter_", false));
}
if ($bVarsFromForm) {
$DB->InitTableVarsForEdit("b_sale_order", "", "str_");
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/prolog.php";
$APPLICATION->SetTitle(str_replace("#ID#", $ID, GetMessage("SOE_TITLE")));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
/*********************************************************************/
/******************** BODY *****************************************/
/*********************************************************************/
if (!$bUserCanViewOrder) {
CAdminMessage::ShowMessage(str_replace("#ID#", $ID, GetMessage("SOE_NO_VIEW_PERMS")) . ". ");
} else {
if (!CSaleOrder::IsLocked($ID, $lockedBY, $dateLock)) {
CSaleOrder::Lock($ID);
}
$aMenu = array(array("TEXT" => GetMessage("SOE_TO_LIST"), "LINK" => "/bitrix/admin/sale_order_edit.php?ID=" . $ID . "&dontsave=Y&lang=" . LANGUAGE_ID . GetFilterParams("filter_")));
$aMenu[] = array("SEPARATOR" => "Y");
if ($bUserCanViewOrder) {
$aMenu[] = array("TEXT" => GetMessage("SOE_TO_DETAIL"), "LINK" => "/bitrix/admin/sale_order_detail.php?ID=" . $ID . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_"));
}
$aMenu[] = array("TEXT" => GetMessage("SOE_TO_PRINT"), "LINK" => "/bitrix/admin/sale_order_print.php?ID=" . $ID . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_"));
if ($saleModulePermissions == "W" || $str_PAYED != "Y" && $bUserCanDeleteOrder) {
$aMenu[] = array("TEXT" => GetMessage("SOEN_CONFIRM_DEL"), "LINK" => "javascript:if(confirm('" . GetMessage("SOEN_CONFIRM_DEL_MESSAGE") . "')) window.location='sale_order.php?ID=" . $ID . "&action=delete&lang=" . LANG . "&" . bitrix_sessid_get() . urlencode(GetFilterParams("filter_")) . "'", "WARNING" => "Y");
}
$context = new CAdminContextMenu($aMenu);
$context->Show();
?>
示例4: array
$APPLICATION->IncludeComponent('bitrix:sale.mobile.order.history', '.default', array(), false);
$result = ob_get_contents();
ob_end_clean();
break;
case "status_save":
if (!$status_id) {
break;
}
if (!CSaleOrder::CanUserChangeOrderStatus($id, $status_id, $GLOBALS["USER"]->GetUserGroupArray())) {
break;
}
$result = CSaleOrder::StatusOrder($id, $status_id);
break;
case "order_cancel":
$bUserCanCancelOrder = CSaleOrder::CanUserCancelOrder($id, $GLOBALS["USER"]->GetUserGroupArray(), $GLOBALS["USER"]->GetID());
if (!$bUserCanCancelOrder || CSaleOrder::IsLocked($id, $lockedBY, $dateLock)) {
break;
}
$cancel = isset($_REQUEST['cancel']) ? trim($_REQUEST['cancel']) : 'N';
$comment = isset($_REQUEST['comment']) ? trim($_REQUEST['comment']) : '';
if (strlen($comment) > 0) {
$comment = $APPLICATION->ConvertCharset($comment, 'utf-8', SITE_CHARSET);
}
$result = CSaleOrder::CancelOrder($id, $cancel, $comment);
break;
case "get_order_html":
$arOrder = CSaleMobileOrderUtils::getOrderInfoDetail($id);
$result = CSaleMobileOrderUtils::makeDetailClassFromOrder($arOrder);
break;
case "delivery_allow":
$bUserCanDeliverOrder = CSaleOrder::CanUserChangeOrderFlag($id, "PERM_DELIVERY", $GLOBALS["USER"]->GetUserGroupArray());