|
Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 System : Windows NT SERVER-PC 10.0 build 26200 (Windows 11) AMD64 User : ServerPC ( 0) PHP Version : 8.2.12 Disable Function : NONE Directory : C:/ProgramData/NVIDIA Corporation/Downloader/latest/NVI2/ |
Upload File : |
<html>
<head>
<title></title>
<style type="text/css">
body, html
{
border: 0px;
margin: 0px;
padding: 0px;
width: 100%;
height: 100%;
background: black;
}
map
{
border: 0px;
margin: 0px;
padding: 0px;
}
img
{
border: 0px;
margin: 0px;
padding: 0px;
}
iframe#frame
{
border: 0px;
margin: 0px;
padding: 0px;
width: 100%;
height: 100%;
overflow: hidden;
}
div
{
border: 0px;
margin: 0px;
padding: 0px;
}
div#content
{
width: 100%;
height: 100%;
}
</style>
<script type="text/javascript" src="json2.js">
</script>
<script type="text/javascript">
//<![CDATA[
//ProgressNameSpace Object stores all the information required top fetch the required content from the web for dynamic content
var ProgressNameSpace = (function() {
var ResponseUrl;
var CommandId;
var CpuId;
var GfeVersion;
var SystemMemory;
var IsBeta;
var dIDa;
var DeviceArchId;
var OsCode;
var Is64BitOs;
var SystemLanguageCode;
var UserSelectedLanguageCode;
var InstalledDisplayDriverVersion;
return {
GetResponseUrl: function() {
return ResponseUrl;
},
SetResponseUrl: function(value) {
ResponseUrl = value;
},
GetData: function() {
return InstallerData;
},
SetData: function(value) {
InstallerData = value;
},
GetCommandId: function() {
return CommandId;
},
SetCommandId: function(value) {
CommandId = value;
},
GetCpuId: function() {
return CpuId;
},
SetCpuId: function(value) {
CpuId = value;
},
GetGfeVersion: function() {
return GfeVersion;
},
SetGfeVersion: function(value) {
GfeVersion = value;
},
GetSystemMemory: function() {
return SystemMemory;
},
SetSystemMemory: function(value) {
SystemMemory = value;
},
GetIsBeta: function() {
return IsBeta;
},
SetIsBeta: function(value) {
IsBeta = value;
},
GetdIDa: function() {
return dIDa;
},
SetdIDa: function(value) {
dIDa = value;
},
GetDeviceArchId: function() {
return DeviceArchId;
},
SetDeviceArchId: function(value) {
DeviceArchId = value;
},
GetOsCode: function() {
return OsCode;
},
SetOsCode: function(value) {
OsCode = value;
},
GetIs64BitOs: function() {
return Is64BitOs;
},
SetIs64BitOs: function(value) {
Is64BitOs = value;
},
GetSystemLanguageCode: function() {
return SystemLanguageCode;
},
SetSystemLanguageCode: function(value) {
SystemLanguageCode = value;
},
GetUserSelectedLanguageCode: function() {
return UserSelectedLanguageCode;
},
SetUserSelectedLanguageCode: function(value) {
UserSelectedLanguageCode = value;
},
GetInstalledDisplayDriverVersion: function() {
return InstalledDisplayDriverVersion;
},
SetInstalledDisplayDriverVersion: function(value) {
InstalledDisplayDriverVersion = value;
}
};
})();
function buildJsonRequest(url, value) {
return url + encodeURIComponent(value);
}
//Get the four part array from the data object and convert it to the javascript array.
function getFourPartDeviceIds() {
window.external.debug("Inside getFourPartDeviceIds()");
var fourPartDeviceIds = [];
var rawList = ProgressNameSpace.GetdIDa();
if (rawList != null) {
for (var e = new Enumerator(rawList); !e.atEnd(); e.moveNext()) {
var deviceId = e.item();
fourPartDeviceIds.push(deviceId);
}
}
else {
window.external.debug("ProgressNameSpace.GetdIDa returned NULL");
}
return fourPartDeviceIds;
}
//
//Get the customer data consent. Currently it is hardcoded to [1,-1,-1]
//It means that we have functional consent from the user.
//
function getCustomerDataConsent() {
window.external.debug("Inside getCustomerDataConsent()");
var custDataConsent = [];
custDataConsent.push("1");
custDataConsent.push("-1");
custDataConsent.push("-1");
return custDataConsent;
}
//Create a presentation URL with the required JSON.
function getPresentationRequest() {
var request =
{
"cmID":ProgressNameSpace.GetCommandId(),
"cID":ProgressNameSpace.GetCpuId(),
"gcV":ProgressNameSpace.GetGfeVersion(),
"sM":ProgressNameSpace.GetSystemMemory(),
"IsB":ProgressNameSpace.GetIsBeta(),
"dIDa":getFourPartDeviceIds(),
"dFma":ProgressNameSpace.GetDeviceArchId(),
"osC":ProgressNameSpace.GetOsCode(),
"is6":ProgressNameSpace.GetIs64BitOs(),
"lg":ProgressNameSpace.GetSystemLanguageCode(),
"gLg":ProgressNameSpace.GetUserSelectedLanguageCode(),
"GFPV":ProgressNameSpace.GetInstalledDisplayDriverVersion(),
"uCst":getCustomerDataConsent()
};
return JSON.stringify(request);
}
//Entry function for the presentation. It sets ProgressNameSpace object and fires the request.
function loadPresentation() {
window.external.debug("Inside loadPresentation");
ProgressNameSpace.SetData(window.external.data);
var data = ProgressNameSpace.GetData();
if (data == null) {
window.external.error("No initialization data, bailing");
return;
}
ProgressNameSpace.SetCommandId(data.commandid);
ProgressNameSpace.SetCpuId(data.cpuid);
ProgressNameSpace.SetGfeVersion(data.gfeVersion);
ProgressNameSpace.SetSystemMemory(data.sM);
ProgressNameSpace.SetIsBeta(data.isBeta);
ProgressNameSpace.SetdIDa(data.dIDa);
ProgressNameSpace.SetDeviceArchId(data.deviceArchId);
ProgressNameSpace.SetOsCode(data.osCode);
ProgressNameSpace.SetIs64BitOs(data.is64BitOs);
ProgressNameSpace.SetSystemLanguageCode(data.systemLanguageCode);
ProgressNameSpace.SetUserSelectedLanguageCode(data.userSelectedLanguageCode);
ProgressNameSpace.SetInstalledDisplayDriverVersion(data.installedDisplayDriverVersion);
var engine = data.engine;
var url = data.url;
if (!url) {
window.external.error("Bootstrap URL has no value, bailing");
return;
}
window.external.debug("Bootstrap URL :- " + url);
var request = getPresentationRequest();
window.external.debug("JSON = " + request);
var fullUrl = buildJsonRequest(
url,
request);
window.external.debug("URI=" + fullUrl);
window.external.read(onRequestFinished, "GET", fullUrl);
}
//This is a callback function. It gets called when the initial request made from loadPresentation responds.
//On success we expect a JSON with required information.
function onRequestFinished(code, response) {
window.external.debug("onReadFinished - code = " + code + " response = " + response);
if (code < 100 || code > 299) {
window.external.warning("Presentation did not load - code = " + code);
return;
}
var obj = JSON.parse(response);
//
//Check for the billboard link only if the sessionState.overallState is true.
//
if (obj.html.body.sessionState.overallState == "true") {
var presentationUrl = obj.html.body.banner.bannerGfeNg[0].contentUrl;
window.external.debug("Presentation URL = " + presentationUrl);
handleResponseElement(presentationUrl);
}
else {
window.external.debug("Aborting dynamic billboard loading. obj.html.body.sessionState.overallState == false.");
}
return;
}
//This function requests the actual dynamic content page.
function handleResponseElement(presentationUrl) {
ProgressNameSpace.SetResponseUrl(presentationUrl);
window.external.debug("Querring to get JSON with url: " + ProgressNameSpace.GetResponseUrl());
window.external.read(onPresentationReceived, "GET", ProgressNameSpace.GetResponseUrl());
}
//It is a callback function. It gets called when the request made in the handleResponseElement reponds/fails.
//On success : It creates a frame with the content and adds it to the "content" div tag.
function onPresentationReceived(code, response) {
if (code < 100 || code > 299) {
window.external.warning("Presentation is in bad state or site is down - code = " + code);
return;
}
window.external.debug("Presentation is opening: " + ProgressNameSpace.GetResponseUrl());
var contentObj = document.getElementById("content");
if (contentObj == null) {
window.external.error("Cannot find content element");
}
var iFrameObj = document.createElement("iframe");
iFrameObj.name = iFrameObj.id = "frame";
iFrameObj.src = ProgressNameSpace.GetResponseUrl();
iFrameObj.scrolling = "no";
iFrameObj.attachEvent("onload", onFrameLoad);
contentObj.appendChild(iFrameObj);
}
//It is a callback function. It gets called when the frame is loaded.
function onFrameLoad() {
var contentObj = document.getElementById("content");
if (contentObj == null) {
window.external.error("Cannot find content element");
}
window.external.debug("frame loaded");
}
//]]>
</script>
</head>
<body id="theBody" onload="loadPresentation()"><div id="content"/></body>
</html>