Exemplo n.º 1
0
<?
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php");
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/sale/include.php");
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/sale/prolog.php");

global $USER;
global $APPLICATION;

$crmMode = (defined("BX_PUBLIC_MODE") && BX_PUBLIC_MODE && array_key_exists("CRM_MANAGER_USER_ID", $_REQUEST));

if ($crmMode)
{
	CUtil::DecodeUriComponent($_GET);
	CUtil::DecodeUriComponent($_POST);

	echo '<link rel="stylesheet" type="text/css" href="/bitrix/themes/.default/sale.css" />';
}

$bUseCatalog = CModule::IncludeModule("catalog");
$bUseIblock = CModule::IncludeModule("iblock");

IncludeModuleLangFile(__FILE__);
ClearVars();

$ID = intval($ID);
$COUNT_RECOM_BASKET_PROD = 2;
$arOrderOldTmp = false;
define("PROP_COUNT_LIMIT", 21);

$arFilter = array(
	"LID" => LANG,
Exemplo n.º 2
0
		exit;
	}

	/*
	 * save tracking number
	 */
	if (isset($_REQUEST["tracking_number"]) && strlen($_REQUEST["tracking_number"]) >= 0)
	{
		$ID = IntVal($ID);
		$tracking_number = trim($tracking_number);

		$bUserCanEditOrder = CSaleOrder::CanUserUpdateOrder($ID, $arUserGroups);

		if (isset($change) && $change == "Y" && $bUserCanEditOrder && !CSaleOrder::IsLocked($ID, $lockedBY, $dateLock))
		{
			CUtil::DecodeUriComponent($tracking_number);
			CSaleOrder::Update($ID, array("TRACKING_NUMBER" => $tracking_number));
		}
		$arResult = array('message' => 'ok');
		$result = CUtil::PhpToJSObject($arResult);

		CRMModeOutput($result);
		exit;
	}

	/*
	 * reason cancel
	 */
	if (isset($_REQUEST["change_cancel"]) && $_REQUEST["change_cancel"] == "Y")
	{
		$errorMessageTmp = "";
Exemplo n.º 3
0
							<?php 
        echo $selectLID;
        ?>
						</td>
					</tr>
					<?php 
    }
    ?>
					<tr>
						<td><?php 
    echo GetMessage('BUYER_BASKET_F_NAME');
    ?>
:</td>
						<td>
							<?php 
    CUtil::DecodeUriComponent($basket_name_product);
    ?>
							<input type="text" name="basket_name_product" size="48" value="<?php 
    echo htmlspecialcharsbx($basket_name_product);
    ?>
" >
						</td>
					</tr>
					<?php 
    $oFilter4->Buttons(array("table_id" => $sTableID_tab4, "url" => $APPLICATION->GetCurPageParam(), "form" => "find_form4"));
    $oFilter4->End();
    ?>
				</form>
				<?php 
    $lAdmin_tab4->DisplayList(array("FIX_HEADER" => false, "FIX_FOOTER" => false));
    ?>
Exemplo n.º 4
0
<?php

require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
CModule::IncludeModule('bizproc');
global $APPLICATION;
if (!check_bitrix_sessid()) {
    die;
}
if (!CBPDocument::CanUserOperateDocumentType(CBPCanUserOperateOperation::CreateWorkflow, $GLOBALS["USER"]->GetID(), $_REQUEST['document_type'])) {
    die;
}
CUtil::DecodeUriComponent($_REQUEST);
$activityType = $_REQUEST['activity'];
$runtime = CBPRuntime::GetRuntime();
$runtime->StartRuntime();
$arActivityDescription = $runtime->GetActivityDescription($activityType);
if ($arActivityDescription == null) {
    die("Bad activity type!" . htmlspecialcharsbx($activityType));
}
$runtime->IncludeActivityFile($activityType);
$isHtml = !empty($_REQUEST['content_type']) && $_REQUEST['content_type'] == 'html';
if ($isHtml) {
    $APPLICATION->ShowAjaxHead();
}
$res = CBPActivity::CallStaticMethod($activityType, "getAjaxResponse", array($_REQUEST));
echo $isHtml ? $res : CUtil::PhpToJSObject($res);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
Exemplo n.º 5
0
         $arResult["ITEMS"] = fGetFormatedProduct($userId, $LID, $arViewed, 1, $currency, $type, $crmMode);
     }
     $arResult["TYPE"] = $type;
     $result = CUtil::PhpToJSObject($arResult);
     CRMModeOutput($result);
     exit;
 }
 /*
  * save comment
  */
 if (strlen($comment) > 0) {
     $ID = IntVal($ID);
     $comment = trim($comment);
     $bUserCanEditOrder = CSaleOrder::CanUserUpdateOrder($ID, $GLOBALS["USER"]->GetUserGroupArray());
     if (isset($change) && $change == "Y" && $bUserCanEditOrder && !CSaleOrder::IsLocked($ID, $lockedBY, $dateLock)) {
         CUtil::DecodeUriComponent($comment);
         CSaleOrder::CommentsOrder($ID, $comment);
     }
     $arResult = array('message' => 'ok');
     $result = CUtil::PhpToJSObject($arResult);
     CRMModeOutput($result);
     exit;
 }
 /*
  * reason cancel
  */
 if (isset($_REQUEST["change_cancel"]) && $_REQUEST["change_cancel"] == "Y") {
     $errorMessageTmp = "";
     $errorMessageReserve = "";
     $arResult = array();
     if (!$bUserCanCancelOrder) {