示例#1
0
<?php

require_once dirname(__DIR__) . "/classes/general/threads.php";
set_time_limit(0);
if ($params = Threads::getParams()) {
    $_SERVER["DOCUMENT_ROOT"] = $DOCUMENT_ROOT = $params["documentRoot"];
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
    Cmodule::IncludeModule("acrit.exportpro");
    $export = new CAcritExportproExport(intval($params["profileId"]));
    $export->Export("cron", $params["cronPage"]);
}
 public static function StartExport($profileId)
 {
     $export = new CAcritExportproExport(intval($profileId));
     $export->Export("cron");
 }
<?php

require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php";
global $ID;
$ID = intval($ID);
$moduleId = 'acrit.exportpro';
$POST_RIGHT = $APPLICATION->GetGroupRight($moduleId);
if ($POST_RIGHT >= 'R') {
    CModule::IncludeModule($moduleId);
    $acritExport = new CAcritExportproExport($ID);
    $acritExport->Export();
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/footer.php";