Exemplo n.º 1
0
								$arModules[$dir]["DEMO_DATE"] = ConvertTimeStamp($GLOBALS["SiteExpireDate_".str_replace(".", "_", $info->MODULE_ID)], "SHORT");
							}
							else
								$arModules[$dir]["DEMO_END"] = "Y";
						}
					}
				}
			}
		}
		closedir($handle);
	}
}
uasort($arModules, create_function('$a, $b', 'if($a["MODULE_SORT"] == $b["MODULE_SORT"]) return strcasecmp($a["MODULE_NAME"], $b["MODULE_NAME"]); return ($a["MODULE_SORT"] < $b["MODULE_SORT"])? -1 : 1;'));

$stableVersionsOnly = COption::GetOptionString("main", "stable_versions_only", "Y");
$arRequestedModules = CUpdateClientPartner::GetRequestedModules("");

$arUpdateList = CUpdateClientPartner::GetUpdatesList($errorMessage, LANG, $stableVersionsOnly, $arRequestedModules, Array("fullmoduleinfo" => "Y"));
$strError_tmp = "";
$arClientModules = CUpdateClientPartner::GetCurrentModules($strError_tmp);


$linkToBuy = false;
$linkToBuyUpdate = false;
if(LANGUAGE_ID == "ru")
{
	$linkToBuy = "http://marketplace.1c-freetrix.ru"."/tobasket.php?ID=#CODE#";
	$linkToBuyUpdate = "http://marketplace.1c-freetrix.ru"."/tobasket.php?ID=#CODE#&lckey=".md5("FREETRIX".CUpdateClientPartner::GetLicenseKey()."LICENCE");
}

$bHaveNew = false;
Exemplo n.º 2
0
@set_time_limit(0);
ini_set("track_errors", "1");
ignore_user_abort(true);

IncludeModuleLangFile(__FILE__);

if(!$USER->CanDoOperation('install_updates'))
	$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));

$errorMessage = "";

$myaddmodule = preg_replace("#[^a-zA-Z0-9.-_]#i", "", $_REQUEST["addmodule"]);

$stableVersionsOnly = COption::GetOptionString("main", "stable_versions_only", "Y");
$bLockUpdateSystemKernel = false;//CUpdateSystemPartner::IsInCommonKernel();
$arRequestedModules = CUpdateClientPartner::GetRequestedModules($myaddmodule);

$strTitle = GetMessage("SUP_TITLE_BASE");
$APPLICATION->SetTitle($strTitle);
$APPLICATION->SetAdditionalCSS("/bitrix/themes/".ADMIN_THEME_ID."/sysupdate.css");
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php");

$arMenu = array(
	array(
		"TEXT" => GetMessage("SUP_CHECK_UPDATES"),
		"LINK" => "/bitrix/admin/update_system_partner.php?refresh=Y&amp;lang=".LANGUAGE_ID."&amp;addmodule=".urlencode($myaddmodule),
		"ICON" => "btn_update_partner",
	),
	array("SEPARATOR" => "Y"),
	array(
		"TEXT" => GetMessage("SUP_SETTINGS"),
ini_set("track_errors", "1");
ignore_user_abort(true);
IncludeModuleLangFile(__FILE__);
$errorMessage = "";
$stableVersionsOnly = COption::GetOptionString("main", "stable_versions_only", "Y");
$queryType = "M";
$arRequestedModules = array();
if (array_key_exists("reqm", $_REQUEST)) {
    $arRequestedModulesTmp = explode(",", $_REQUEST["reqm"]);
    for ($i = 0, $cnt = count($arRequestedModulesTmp); $i < $cnt; $i++) {
        if (!in_array($arRequestedModulesTmp[$i], $arRequestedModules)) {
            $arRequestedModules[] = $arRequestedModulesTmp[$i];
        }
    }
} else {
    $arRequestedModules = CUpdateClientPartner::GetRequestedModules($_REQUEST["addmodule"]);
}
COption::SetOptionString("main", "update_system_update", Date($GLOBALS["DB"]->DateFormatToPHP(CSite::GetDateFormat("FULL")), time()));
/************************************/
$arUpdatedModulesList = array();
$loadResult = CUpdateClientPartner::LoadModulesUpdates($errorMessage, $arUpdateDescription, LANG, $stableVersionsOnly, $arRequestedModules, array_key_exists("reqm", $_REQUEST));
if ($loadResult == "S") {
    CUpdateClientPartner::AddMessage2Log("LoadModulesUpdates-Step", "LMU01");
    $message = "";
    if (isset($arUpdateDescription["DATA"]["#"]["ITEM"])) {
        for ($i = 0, $cnt = count($arUpdateDescription["DATA"]["#"]["ITEM"]); $i < $cnt; $i++) {
            if (strlen($message) > 0) {
                $message .= ", ";
            }
            $message .= $arUpdateDescription["DATA"]["#"]["ITEM"][$i]["@"]["NAME"];
            if (strlen($arUpdateDescription["DATA"]["#"]["ITEM"][$i]["@"]["VALUE"]) > 0) {