2025-04-27 07:49:33 -04:00

367 lines
9.4 KiB
Plaintext

<html XMLNS:helpcenter>
<head>
#include "header.inc"
#include "debug_js.inc"
#include "constants.inc"
<TITLE>Remote Assistance</TITLE>
<meta http-equiv="MSThemeCompatible" content="Yes">
<LINK REL="STYLESHEET" HREF="../../Css/rc.css" TYPE="text/css">
</head>
<helpcenter:context id=idCtx />
<body id='idBody' tabIndex=-1 leftmargin="0" OnLoad="DoLoad()" scroll="no" >
<DIV id="idStep1" class="styPosition">
<TABLE border="0" cellspacing="5" class="MaxLayout" cellpadding="6" align="center">
<TR class="PageTitle">
<td valign="center" align="left" class="styText">
<STRONG><SPAN id="idHelper">Your Helper</SPAN> has accepted your invitation to give you Remote Assistance.</STRONG>
</td>
</TR>
<TR>
<TD class="styText">
To let <SPAN id="idHelper1">Your Helper</SPAN> connect to your computer, click Start.
</TD>
</TR>
<TR>
<TD class="styText">
<input tabIndex=2 type="checkbox" id="idPassChk"><LABEL for="idPassChk">Protect this session with a password.</LABEL>&nbsp;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A class="CURSOR" Onclick="parent.LaunchHelp(2)" ondragstart="return false;">Learn about Remote Assistance security...</A>
</TD>
</TR>
<TR>
<TD align="right">
<input class=styButton type="button" value="Start" onClick="DoStart()" >&nbsp;
<input class=styButton type="button" value="Cancel" onClick="PopupThanks()" >
</TD>
</TR>
</TABLE>
</DIV>
<DIV id="idStep2" class="DisplayNone">
<table class="MaxLayout" border="0" cellspacing="5" cellpadding="6">
<tr >
<td colspan=2 class="StyText">
Create a Password that <Span id="idHelper2">your helper</Span> will need to enter to connect to your computer (optional).
</td>
</tr>
<tr >
<td nowrap style="width:50%" class="styText">
Password:
<br>
<input tabIndex=3 type=password id="idPass1" name="Password1" class="MaxWidth">
</td>
<td nowrap style="width:50%" class="styText">
Confirm Password:
<br>
<input tabIndex=4 type=password id="idPass2" name="Password2" class="MaxWidth" >
</td>
</tr>
<TR >
<TD colspan="2" align="right">
<input class=styButton type="button" value="OK" onClick="DoSend()" id=button1 name=button1>&nbsp;
<input class=styButton type="button" value="Cancel" onClick="GoStep1()" id=button2 name=button2><BR>
<HR>
<Table border=0 class="MaxWidth">
<TR>
<TD style="Width:5%">
<IMG src="../../Common/icon_warning_32x.gif"></IMG>
</TD>
<TD>
<font class="styText"> Setting a password that your assistant must use to connect to your computer is strongly recommended. Do not use your network or Windows logon password.</font>
</TD>
</TR>
</Table>
</TD>
</TR>
<Table>
</DIV>
</body>
<script language=JavaScript>
/*
* Localizable constants, text and messages
*/
var L_NOPASSWDMSN_Text = "Please provide password or uncheck 'Protect session' checkbox in the Previous step.";
var oIM = null;
var gIsServer = false;
/*
Function: DoLoad()
Description : Function get called on the onload event of the window.
*/
function DoLoad()
{
var L_ERRACCESSDENIED_Text = "Directly launching this page is not allowed. ";
if( null == parent.OnLoad1 )
{
idBody.className = "Hidden";
alert( L_ERRACCESSDENIED_Text );
return;
}
TraceFunctEnter("DoLoad");
try
{
//idCtx.ChangeContext( "kioskmode", "");
//idCtx.setWindowDimensions( 100, 100, 425,200);
oIM = new ActiveXObject("rcBdyCtl.Connection");
}
catch (error)
{
parent.FatalError(parent.L_RCCTL_Text ,error);
return;
}
var i = document.URL.indexOf("?", 1);
if (i > 0)
{
var type = document.URL.slice(i+1);
if ((i=type.indexOf("CLIENT=")) >= 0)
{
idHelper.innerText = unescape(type.slice(i+7));
idHelper1.innerText=idHelper.innerText;
idHelper2.innerText=idHelper.innerText;
}
}
TraceFunctLeave();
}
/*
Function:GoStep1()
Description :This function gets called when the helpee hits cancel button from the Password dialog.
It goes to Step1
*/
function GoStep1()
{
//idCtx.ChangeContext( "kioskmode", "");
//idCtx.setWindowDimensions( 100, 100, 425,200);
idStep1.className="Display";
idStep2.className="DisplayNone";
idPass1.value="";
idPass2.value="";
idPassChk.checked=false;
}
/*
Function : DoStart()
Description : This function gets called when the start button is clicked in the step1.
If the "Protect this session with a password" checkbox is checked then
it goes to step1 else proceeds with the connection.
*/
function DoStart()
{
if (idPassChk.checked)
{
//idCtx.ChangeContext( "kioskmode", "");
//idCtx.setWindowDimensions( 100, 100, 455,230);
idStep2.className = "Display";
idStep1.className = "DisplayNone";
idPass1.focus();
}
else
{
DoSend();
}
}
/*
Function : DoSend()
Description : This function creates the incident object and attaches
it to an email and sends it to the recipient.
*/
function DoSend()
{
var sPass = "";
var sPassStub = "";
var oSetting = null;
TraceFunctEnter("DoSend");
// Check password.
if (idPassChk.checked && (idPass1.value.length ==0 && idPass2.value.length ==0))
{
alert(L_NOPASSWDMSN_Text);
return;
}
if (idPassChk.checked && (idPass1.value != idPass2.value))
{
alert(parent.L_INVALIDPASS_Text);
return;
}
try
{
oSetting = new ActiveXObject( szProgIDEscalationSetting );
}
catch (error)
{
parent.FatalError(parent.L_RCCTL_Text,error);
return;
}
//Encryption of the password
if (idPass1.value.length > 0)
{
try
{
var oEnc = parent.pchealth.CreateObject_Encryption();
sPassStub = oSetting.CreatePassword;
sPass = oEnc.EncryptString(idPass1.value, sPassStub);
sPass = (5+sPass.length) + ";PASS=" + sPass;
}
catch (error)
{
parent.FatalError(parent.L_ENCRYPT_Text,error);
}
}
var iExpiry = 5; // 5 minutes to expire.
if (parent.Init( iExpiry * 60, sPass ) == false)
{
return false;
}
var oRCSession = parent.oRCSession;
var oChannel = parent.oChannel;
var RcXMLTempFile = null;
var ip = null;
var sExpiry = "";
try
{
RcXMLTempFile = oSetting.GetUserTempFileName;
ip = oSetting.GetIPAddress;
if (ip.length == 0)
{
alert(parent.L_NOIP_Text);
return;
}
}
catch(error)
{
parent.FatalError(parent.L_RCCTL_Text,error);
return;
}
//creating the incident object
sSalemID = oRCSession.ConnectParms;
oRCSession.OnConnected = parent.onCallBackConnect;
try
{
var IncidentFile = oChannel.VendorDirectory + "\\rcBuddy.MsRcIncident";
oInc = parent.pchealth.CreateObject_Incident();
}
catch(error)
{
parent.FatalError("",error);
return;
}
oInc.RcTicket = sSalemID;
if (sPass != "")
{
oInc.RCTicketEncrypted = true;
}
var oDict = oInc.Misc;
try
{
var d = new Date();
var iNow = Math.round(Date.parse(d)/1000);
oDict.add("DtStart", iNow);
oDict.add("DtLength", iExpiry);
oDict.add("IP", ip);
oDict.add("Status", "Active");
oDict.add("DeleteTicket", "1");
oDict.add("NoPrompt", "1");
oDict.add("NoChat", "1");
oDict.add("Method","IM");
//
// Check for modem connectivity
//
try
{
if( true == parent.pchealth.Connectivity.IsAModem )
{
oInc.Misc("L") = 1;
}
else
{
oInc.Misc("L") = 0;
}
}
catch(error)
{
oInc.Misc("L") = 0;
}
if (sPass != "")
oDict.add("PassStub", sPassStub);
d = new Date((iNow + iExpiry * 60) * 1000);
sExpiry = d.toLocaleString();
}
catch (error)
{
parent.FatalError("",error);
}
oInc.StartPage = "Remote%20Assistance/RcBuddy.htm";
// Save incident OFF to an XML file
try
{
oInc.GetXML(IncidentFile);
}
catch(error)
{
parent.FatalError("",error);
}
// Send the incident to the Expert
try
{
oIM.SendDataFromFile(IncidentFile);
// Then, tell Stub to read information
oIM.NotifyStub();
// Do we need to save ticket locally for this scenario?
oInc.GetXML(RcXMLTempFile);
oChannel.RecordIncident("IM Buddy", sSalemID, "", RcXMLTempFile);
parent.pchealth.Close();
return;
}
catch (error)
{
parent.FatalError("Send data failed",error);
}
TraceFunctLeave();
}
/*
Function :PopupThanks()
Description : Closes the helpctr
*/
function PopupThanks()
{
try
{
parent.pchealth.Close();
return;
}
catch(error)
{
parent.FatalError("",error);
}
}
</script>
</html>