204 lines
5.1 KiB
Plaintext
204 lines
5.1 KiB
Plaintext
<HTML>
|
|
<HEAD>
|
|
#include "header.inc"
|
|
#include "constants.inc"
|
|
#include "debug_js.inc"
|
|
|
|
<TITLE id="idTitle" name="idTitle">REMOTE_ASSISTANCE_MAIN</TITLE>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<meta http-equiv="MSThemeCompatible" content="Yes">
|
|
#ifdef _WIN64
|
|
</HEAD>
|
|
<BODY>
|
|
<center>
|
|
<Span id="idWin64Msg" name="idWin64Msg"> Remote Assistance is not supported in the 64-bit version of Windows XP. </Span>
|
|
</center>
|
|
</Body>
|
|
#else
|
|
<OBJECT ID="pchealth" name="pchealth" classid="CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7"></OBJECT>
|
|
<script id="idScript1" name="idScript1" LANGUAGE="Javascript" SRC="../../Common/Constants.js"> </script>
|
|
<script id="idScript2" name="idScript2" LANGUAGE="Javascript" SRC="../../Common/Common.js"> </script>
|
|
<script id="idScript3" name="idScript3" Language=JavaScript>
|
|
|
|
|
|
//var sEamil = null;
|
|
//var oDeskMgr = null;
|
|
//var gHelper = null;
|
|
//var gHelperName = null;
|
|
//var gIsIM = false;
|
|
//var gIsFile = false;
|
|
//var gTimerId = -1;
|
|
var oChannel = null;
|
|
var oRCSession = null;
|
|
var sSalemID = "";
|
|
var oSmapi = null;
|
|
var tempStore=null; // to store the Incident object while resending the ticket
|
|
var tempPassStatus=null; //flag : if the Incident object has password or not while resending the ticket
|
|
var tempTime=null; // stores time when resending the ticket using email
|
|
var ResendFlag=false; //flag : Notify if it is resend of a ticket
|
|
|
|
// Incident information
|
|
var sTo = null;
|
|
var sFrom = null;
|
|
var sMsg = null;
|
|
var iExpirySaveFile=null;
|
|
var sFileLoc=null; // stores the location of the ticket that is saved
|
|
// Channel information
|
|
var sVendorID = "CN=Microsoft Corporation,L=Redmond,S=Washington,C=US";
|
|
var sProductID = "Microsoft Remote Assistance";
|
|
|
|
// Navigation control
|
|
var g_bRAStart = null;
|
|
|
|
//
|
|
// Desktop Control Permissions
|
|
//
|
|
var DESKTOPSHARING_DEFAULT = 0x0000;
|
|
var NO_DESKTOP_SHARING = 0x0001;
|
|
var VIEWDESKTOP_PERMISSION_REQUIRE = 0x0002;
|
|
var VIEWDESKTOP_PERMISSION_NOT_REQUIRE = 0x0004;
|
|
var CONTROLDESKTOP_PERMISSION_REQUIRE = 0x0008;
|
|
var CONTROLDESKTOP_PERMISSION_NOT_REQUIRE = 0x00010;
|
|
|
|
//var L_NOSETTING_Text = "Can't get channel setting: ";
|
|
//var L_REMOTEDSKMGR_FAIL = "CoCreate RemoteDesktopManager failed: ";
|
|
//var L_ACCEPT_Text = "Accepted() failed: ";
|
|
//var L_REJECT_Text = "Rejected() failed: ";
|
|
|
|
/*
|
|
Function :OnLoad1()
|
|
Description :
|
|
*/
|
|
function OnLoad()
|
|
{
|
|
TraceFunctEnter("OnLoad");
|
|
|
|
|
|
|
|
TraceFunctLeave();
|
|
}
|
|
/*
|
|
Function : DoUnload()
|
|
Description:
|
|
*/
|
|
function DoUnload()
|
|
{
|
|
TraceFunctEnter("DoUnload");
|
|
try
|
|
{
|
|
if (oSmapi != null)
|
|
{
|
|
oSmapi.Logoff();
|
|
}
|
|
}
|
|
catch(error)
|
|
{
|
|
alert(L_RCCTL_Text);
|
|
return;
|
|
}
|
|
TraceFunctLeave();
|
|
}
|
|
/*
|
|
Function :Init()
|
|
Description : This function accepts the expiry time and based upon that
|
|
creates and opens a RemoteDesktopSession for that particular time interval.
|
|
It gets called when you send an Invitation to the recipient.
|
|
*/
|
|
function Init( iDuration, sPass )
|
|
{
|
|
TraceFunctEnter("Init");
|
|
if (iDuration == null)
|
|
{
|
|
iDuration = 0;
|
|
}
|
|
|
|
// open channel object
|
|
if (oChannel == null)
|
|
{
|
|
try
|
|
{
|
|
oChannel = pchealth.CreateObject_Channel(sVendorID, sProductID);
|
|
}
|
|
catch (error)
|
|
{
|
|
alert(L_NOCHANNEL_Text);
|
|
return false;
|
|
}
|
|
}
|
|
// open RDSession
|
|
if (oRCSession == null )
|
|
{
|
|
try
|
|
{
|
|
if ( sFrom.length > 0 )
|
|
{
|
|
sPass += ( 5 + sFrom.length) + ";FROM=" + sFrom;
|
|
}
|
|
|
|
oRCSession = pchealth.CreateObject_RemoteDesktopSession(iDuration, sSalemID, sPass);
|
|
oRCSession.OnConnected = function( salemID, userSID, sessionID)
|
|
{ onCallBackConnect( salemID, userSID, sessionID ); }
|
|
|
|
}
|
|
catch (error)
|
|
{
|
|
alert(L_NORCSESSION_Text);
|
|
return false;
|
|
}
|
|
}
|
|
TraceFunctLeave();
|
|
return true;
|
|
}
|
|
/*
|
|
Function : onCallBackConnect()
|
|
Description: call back function from buddy
|
|
*/
|
|
function onCallBackConnect( salemID, userSID, sessionID )
|
|
{
|
|
TraceFunctEnter("onCallBackConnect");
|
|
// Is this a valid salemID ?
|
|
//idSrc.window.navigate("HelpeeAccept.htm"); No need for this
|
|
TraceFunctLeave();
|
|
}
|
|
function GetMapi()
|
|
{
|
|
TraceFunctEnter("GetMapi");
|
|
if (oSmapi == null)
|
|
{
|
|
try
|
|
{
|
|
oSmapi = new ActiveXObject("RcBdyCtl.SMapi");
|
|
|
|
}
|
|
catch (error)
|
|
{
|
|
alert(L_RCCTL_Text);
|
|
return false;
|
|
}
|
|
}
|
|
return oSmapi;
|
|
TraceFunctLeave();
|
|
}
|
|
</script>
|
|
</HEAD>
|
|
<frameset id="idframeset" name="idframeset" COLS="100%" onload="OnLoad()" onunload="DoUnload()">
|
|
<frame id="idSrc" name="idSrc" src="rcScreen2.htm">
|
|
</frameset>
|
|
#endif // _WIN64
|
|
</HTML>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|