234 lines
7.5 KiB
HTML
234 lines
7.5 KiB
HTML
<html XMLNS:helpcenter>
|
|
<head>
|
|
<title>Untitled Document</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<LINK REL="STYLESHEET" HREF="rcBuddy.css" TYPE="text/css">
|
|
</head>
|
|
<helpcenter:context id=idCtx />
|
|
|
|
<Script Language=JavaScript>
|
|
var oIM = null;
|
|
var gIsServer = false;
|
|
</Script>
|
|
<body tabIndex=-1 leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" OnLoad="DoLoad()" scroll="no"
|
|
style="BORDER-LEFT: black 2px solid;BORDER-RIGHT: black 2px solid; BORDER-TOP: black 2px solid; BORDER-BOTTOM: black 2px solid;">
|
|
<table class=styHelpBackGround cellspacing="0" cellpadding="0" width="100%" Height="100%">
|
|
<tr valign="top">
|
|
<td>
|
|
<Div id="idStep1">
|
|
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="8">
|
|
<tr>
|
|
<td>
|
|
<font id="idHelper">Your Helper</font> has accepted your invitation to give you Remote Assistance.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Click <B>Start</B> to start a Remote Assistance now.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><input tabIndex=2 type="checkbox" id="idPassChk">Protect this session with a password to add <A href=Java:NoOp OnClick="Alert('PopUp security');">extra security</A></input>
|
|
</tr>
|
|
<tr>
|
|
<td align="right">
|
|
<input class=styButton type="button" value="Start" onClick="DoStart()" style="WIDTH:75px">
|
|
<input class=styButton type="button" value="Cancel" onClick="PopupThanks()" style="WIDTH:75px">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</Div>
|
|
<Div id="idStep2" style="display:none">
|
|
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="8">
|
|
<tr>
|
|
<td colspan=2>
|
|
Create a Password that <font id="idHelper1">your helper</font> will need to
|
|
enter to start a session (optional).
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap>
|
|
<font class="cssNotation">
|
|
Enter Password</font><br>
|
|
<input tabIndex=3 type=password id="idPass1" name="Password1" style="width:80%">
|
|
</td>
|
|
<td nowrap>
|
|
<font class="cssNotation">
|
|
Confirm Password</font><br>
|
|
<input tabIndex=4 type=password id="idPass2" name="Password2" style="width:80%">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" valign="top">
|
|
<font class="cssNotation" style="color:black">
|
|
<br>
|
|
<B>Important</b><br>
|
|
If you use a password, your helper will need it to start the help session so you must communicate it seperately (e.g., by phone).
|
|
</font>
|
|
</td>
|
|
</tr>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" align="right">
|
|
<input class=styButton type="button" value="OK" onClick="DoSend()" style="WIDTH:75px">
|
|
<input class=styButton type="button" value="Cancel" onClick="GoStep1()" style="WIDTH:75px">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</Div>
|
|
</table>
|
|
</body>
|
|
|
|
<script language=JavaScript>
|
|
function DoLoad() {
|
|
idCtx.ChangeContext( "kioskmode", "");
|
|
idCtx.setWindowDimensions( 100, 100, 366, 290);
|
|
try {
|
|
oIM = new ActiveXObject("rcIMCtl.Connection");
|
|
} catch (e) {
|
|
alert("Can't create Event object: " + e.description);
|
|
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));
|
|
}
|
|
}
|
|
}
|
|
|
|
function GoStep1() {
|
|
idStep1.style.display="";
|
|
idStep2.style.display="none";
|
|
}
|
|
|
|
function DoTrans() {
|
|
// Save info to Depot.
|
|
oIM.SendData(idTest.value);
|
|
// Then, tell Stub to read information
|
|
oIM.NotifyStub();
|
|
}
|
|
|
|
function DoStart() {
|
|
if (idPassChk.checked) { // goto step 2
|
|
idStep2.style.display = "";
|
|
idStep1.style.display = "none";
|
|
}
|
|
else
|
|
DoSend();
|
|
}
|
|
|
|
function DoSend() {
|
|
// 1. Check password.
|
|
if (idPassChk.checked && (idPass1.value.length ==0 &&
|
|
idPass2.value.length ==0)) {
|
|
var L_NOPASSWD_MSG = "Please provide password or unckeck 'Protect session' checkbox.";
|
|
alert(L_NOPASSWD_MSG);
|
|
return;
|
|
}
|
|
|
|
if (idPassChk.checked && (idPass1.value != idPass2.value)) {
|
|
var L_INVALIDPASS_MSG = "Passwords don't match.\nPlease re-type your password.";
|
|
alert(L_INVALIDPASS_MSG);
|
|
return;
|
|
}
|
|
|
|
//
|
|
var iExpiry = 5; // 5 minutes to expire.
|
|
if (parent.Init( iExpiry * 60 ) == false)
|
|
return false;
|
|
|
|
var oRCSession = parent.oRCSession;
|
|
var oChannel = parent.oChannel;
|
|
var oSetting = null;
|
|
var RcXMLTempFile = null;
|
|
var ip = null;
|
|
var sExpiry = "";
|
|
|
|
try {
|
|
oSetting = new ActiveXObject("RcBdyCtl.Setting");
|
|
RcXMLTempFile = oSetting.GetUserTempFileName;
|
|
ip = oSetting.GetIPAddress;
|
|
if (ip.length == 0) {
|
|
var L_NOIP_MSG = "No IP address selected or found.\nCan not proceed without IP address.";
|
|
alert(L_NOIP_MSG);
|
|
return;
|
|
}
|
|
oSetting = null;
|
|
} catch(e) {
|
|
var L_RCCTL_MSG = "Failed on getting RcBdyCtl: ";
|
|
alert(L_RCCTL_MSG + e.description);
|
|
return;
|
|
}
|
|
|
|
//sSalemID = oRCSession.ConnectParmsEx(ip);
|
|
sSalemID = oRCSession.ConnectParms;
|
|
oRCSession.OnConnected = parent.onCallBackConnect;
|
|
|
|
var IncidentFile = oChannel.VendorDirectory + "\\rcBuddy.MsRcIncident";
|
|
|
|
oInc = parent.pchealth.CreateObject_Incident();
|
|
//oInc.UserName = parent.sFrom;
|
|
//oInc.ProblemDescription = parent.sMsg;
|
|
|
|
if (idPass1.value.length > 0) {
|
|
try {
|
|
var oEnc = parent.pchealth.CreateObject_Encryption();
|
|
oInc.RcTicket = oEnc.EncryptString(idPass1.value, sSalemID);
|
|
oInc.RCTicketEncrypted = true;
|
|
}
|
|
catch (e) {
|
|
alert("Encryption: " + e.description);
|
|
}
|
|
} else
|
|
oInc.RcTicket = sSalemID;
|
|
|
|
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("IM", "1);
|
|
oDict.add("DeleteTicket", "1");
|
|
oDict.add("NoPrompt", "1");
|
|
oDict.add("NoChat", "1");
|
|
d = new Date((iNow + iExpiry * 60) * 1000);
|
|
sExpiry = d.toLocaleString();
|
|
} catch (e) {
|
|
alert(e.description);
|
|
}
|
|
oInc.StartPage = "rcBuddy/RcBuddy.htm";
|
|
|
|
// Save incident OFF to an XML file
|
|
//
|
|
oInc.GetXML(IncidentFile);
|
|
|
|
//
|
|
// Send the incident to the Expert
|
|
//
|
|
// Send
|
|
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);
|
|
PopupThanks();
|
|
} catch (e) {
|
|
alert("Send data failed: " + e.description);
|
|
}
|
|
}
|
|
|
|
function PopupThanks() {
|
|
parent.pchealth.Close();
|
|
}
|
|
|
|
</script>
|
|
</html>
|