Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

308 lines
9.5 KiB

  1. <html>
  2. <head>
  3. #include "header.inc"
  4. #include "debug_js.inc"
  5. #include "constants.inc"
  6. <TITLE id="idTitle" name="idTitle">REMOTE_ASSISTANCE_INVITE</TITLE>
  7. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  8. <meta http-equiv="MSThemeCompatible" content="Yes">
  9. <LINK id="UI_StyleSheet1" REL="STYLESHEET" TYPE="text/css" HREF="../../Css/rcBuddy.css">
  10. <LINK id="UI_StyleSheet2" REL="stylesheet" TYPE="text/css" HREF="hcp://system/css/shared.css">
  11. <Script id="idScript1" name="idScript1" language="javascript">
  12. /*
  13. * Localizable constants, text and messages
  14. */
  15. var L_ERRACCESSDENIED_Text = "Directly launching this page is not allowed. ";
  16. var L_MsRcIncidentFile_Text = "MsRcIncident Files (*.msrcincident)\0*.msrcincident\0";
  17. var tempflag=0;
  18. function onLoad()
  19. {
  20. TraceFunctEnter("onLoad");
  21. try
  22. {
  23. if( null == parent.OnLoad || parent.g_bRAStart == null)
  24. {
  25. idBody.style.visibility = "hidden";
  26. window.navigate( "hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Common/rcscreen1.htm" );
  27. return;
  28. }
  29. /*if (parent.ResendFlag)
  30. {
  31. tempflag=1;
  32. if (parent.tempPassStatus)
  33. {
  34. idchkpassword.checked=true;
  35. idPassword.value="**********";
  36. idConfirm.value="**********";
  37. }
  38. else
  39. {
  40. idchkpassword.checked=false;
  41. PasswordState();
  42. }
  43. }*/
  44. idchkpassword.focus();
  45. }
  46. catch(error)
  47. {
  48. alert(parent.L_RCCTL_Text);
  49. return;
  50. }
  51. TraceFunctLeave();
  52. }
  53. function EnableCreate()
  54. {
  55. TraceFunctEnter("EnableCreate");
  56. try
  57. {
  58. if((idPassword.value.length!=0) && (idConfirm.value.length!=0))
  59. {
  60. if (window.event.keyCode == 13)
  61. {
  62. OnSave();
  63. }
  64. else
  65. {
  66. idbtnSave.disabled=false;
  67. }
  68. }
  69. else
  70. {
  71. idbtnSave.disabled=true;
  72. }
  73. }
  74. catch(error)
  75. {
  76. alert(ERROR_STRING(parent.L_RCCTL_Text, error));
  77. return;
  78. }
  79. TraceFunctLeave();
  80. }
  81. function PasswordState()
  82. {
  83. TraceFunctEnter("PasswordState");
  84. try
  85. {
  86. if (idchkpassword.checked)
  87. {
  88. idPassword.disabled = false;
  89. idConfirm.disabled = false;
  90. idbtnSave.disabled = true;
  91. EnableCreate();
  92. }
  93. else
  94. {
  95. idPassword.disabled = true;
  96. idConfirm.disabled = true;
  97. idbtnSave.disabled = false;
  98. }
  99. }
  100. catch(error)
  101. {
  102. alert(parent.L_RCCTL_Text);
  103. return;
  104. }
  105. TraceFunctLeave();
  106. }
  107. function OnSave()
  108. {
  109. TraceFunctEnter("OnSave");
  110. var sPass = "";
  111. var oSetting1 = null;
  112. var oChannel = null;
  113. var oItem = null;
  114. var ip = null;
  115. var oIncResend = null;
  116. var oInc = null;
  117. try
  118. {
  119. oSetting1 = new ActiveXObject( szProgIDSetting );
  120. if (parent.ResendFlag)
  121. {
  122. oIncResend =parent.pchealth.CreateObject_Incident();
  123. oItem = parent.tempStore;
  124. XMLFile = oItem.XMLDataFile;
  125. oIncResend.LoadFromXMLFile(XMLFile);
  126. //close existing session if required...
  127. }
  128. else // New file.
  129. {
  130. XMLFile = oSetting1.GetUserTempFileName;
  131. }
  132. if (idchkpassword.checked)
  133. {
  134. if(idPassword.value.length ==0 && idConfirm.value.length ==0)
  135. {
  136. alert(parent.L_NOPASSWD_Text);
  137. idPassword.focus();
  138. return;
  139. }
  140. if (idPassword.value != idConfirm.value)
  141. {
  142. alert(parent.L_INVALIDPASS_Text);
  143. idPassword.value="";
  144. idConfirm.value="";
  145. idPassword.focus();
  146. idbtnSave.disabled=true;
  147. return;
  148. }
  149. sPass = idPassword.value;
  150. }
  151. // Get file name,
  152. var o = new ActiveXObject("SAFRCFileDlg.FileSave");
  153. o.FileName = "RAInvitation.msrcincident";
  154. o.FileType = L_MsRcIncidentFile_Text;
  155. if (o.OpenFileSaveDlg())
  156. {
  157. var tFileName = o.FileName;
  158. var temp = tFileName.toLowerCase();
  159. var i = temp.lastIndexOf(".msrcincident");
  160. if (i == -1 || i < temp.length - 13)
  161. {
  162. tFileName += ".msrcincident";
  163. }
  164. parent.sFileLoc = tFileName; // Need to let result page knows where the file is.
  165. // create a new RAIncident
  166. oInc = parent.InitRAIncident(parent.iExpirySaveFile * 60, parent.sFrom, "", sPass );
  167. oInc.GetXML(tFileName);
  168. // add necessary field for local reference.
  169. parent.SaveLocalReference(oInc, XMLFile, true);
  170. if (parent.ResendFlag)
  171. {
  172. oItem.URL = oInc.RcTicket;
  173. oItem.DisplayString = tFileName;
  174. // need to kill the old session.
  175. if (oIncResend != null && oIncResend.Misc("Status") != parent.INCIDENTSTATUS_EXPIRED)
  176. {
  177. oIncResend.CloseRemoteAssistanceIncident();
  178. }
  179. }
  180. else
  181. {
  182. parent.oChannel.RecordIncident(tFileName, oInc.RcTicket, "", XMLFile);
  183. }
  184. navigate("rcScreen7.htm?screen9");
  185. }
  186. else
  187. {
  188. // Bug 648037 - RA: Incident store is corrupted - can't be viewed at all - after cancelling Save As... dialog when resending a ticket
  189. //The temporary file should be deleted only when not the "Resend" case
  190. if (!parent.ResendFlag)
  191. {
  192. // Bug 413116 - Bug Bash: Save to File Escalation:Misssing code to clean up local reference files.
  193. // OpenFileSaveDlg() has been cancelled.
  194. // Delete the temporary file.
  195. var fso = new ActiveXObject("Scripting.FileSystemObject");
  196. fso.DeleteFile( XMLFile );
  197. }
  198. }
  199. }
  200. catch(error)
  201. {
  202. if (oInc != null) // unexpected error, need to remove the ticket.
  203. {
  204. try
  205. {
  206. oInc.CloseRemoteAssistanceIncident();
  207. }
  208. catch (e1)
  209. {} // silently fail if this function failed.
  210. }
  211. alert(ERROR_STRING(parent.L_RCCTL_Text, error));
  212. }
  213. TraceFunctLeave();
  214. }
  215. </Script>
  216. </head>
  217. <BODY id="idBody" name="idBody" scroll="auto" onload="onLoad();" class="margin sys-rhp-bgcolor">
  218. <table class="MaxLayout" id="idtableframe" name="idtableframe" cellpadding="16px" border="0">
  219. <tr>
  220. <td class="valignTop">
  221. <TABLE id="RA_Table" name="RA_Table" class="MaxWidth" border="0" cellspacing="0" cellpadding="0">
  222. <TR>
  223. <TD id="idTd1" name="idTd1" colspan="2">
  224. <Span id="idMainTitle" name="idMainTitle" class="sys-font-heading3 sys-rhp-color-title">Remote Assistance - Save Invitation</Span>
  225. </TD>
  226. </TR>
  227. <TR>
  228. <TD class="Height7" colspan="2">
  229. </TD>
  230. </TR>
  231. <TR>
  232. <TD id="idTd2" name="idTd2" colspan="2" class="sys-table-cell-bgcolor3">
  233. &nbsp;<Input type="Checkbox" name="idchkpassword" id="idchkpassword" checked onclick="PasswordState();" tabindex="1"><Label id="idSubTitle2" name="idSubTitle2" For="idchkpassword" class="sys-font-body-bold sys-color-body valignmiddle">&nbsp;Require the recipient to use a password</Label>
  234. </TD>
  235. </TR>
  236. <TR>
  237. <TD class="Height8" colspan="2">
  238. </TD>
  239. </TR>
  240. <TR>
  241. <TD id="idTd3" name="idTd3" colspan="2">
  242. <Span id="idText2" name="idText2" class="valignmiddle sys-font-body sys-color-body">For security reasons, it is strongly recommended that you set a password that
  243. the recipient must use to connect to your computer. Do not use your network
  244. or Windows logon password.</Span>
  245. </TD>
  246. </TR>
  247. <TR>
  248. <TD class="Height9" colspan="2">
  249. </TD>
  250. </TR>
  251. <TR>
  252. <TD id="idTd4" name="idTd4" class="width4">
  253. <Span id="idTextPassword" name="idTextPassword" class="sys-font-body sys-color-body">Type password:</Span>
  254. </TD>
  255. <TD id="idTd5" name="idTd5" class="Width2">
  256. <Span id="idTextConfirm" name="idTextConfirm" class="sys-font-body sys-color-body">Confirm password:</Span>
  257. </TD>
  258. </TR>
  259. <TR>
  260. <TD class="Height8" colspan="2">
  261. </TD>
  262. </TR>
  263. <TR>
  264. <TD class="width4">
  265. <Input type="password" name="idPassword" id="idPassword" onkeyup="EnableCreate();" onpaste="EnableCreate();" class="sys-font-body sys-color-body Width3" tabindex="2">
  266. </TD>
  267. <TD class="Width2">
  268. <Input type="password" name="idConfirm" id="idConfirm" onkeyup="EnableCreate();" onpaste="EnableCreate();" class="sys-font-body sys-color-body Width15" tabindex="3">
  269. </TD>
  270. </TR>
  271. <TR>
  272. <TD class="Height4" colspan="2">
  273. </TD>
  274. </TR>
  275. <TR>
  276. <TD colspan="2" id="idTd6" name="idTd6">
  277. <span id="idText3" name="idText3" class="valignmiddle sys-font-body sys-color-body"><B>Important</B>&nbsp;&nbsp;You must communicate the password to the recipient.</span><P id="idP" name="idP">
  278. <HR id="idHr" name="idHr" class="bordertype1 sys-toppane-color-border">
  279. </TD>
  280. </TR>
  281. <TR>
  282. <TD class="Height8" colspan="2">
  283. </TD>
  284. </TR>
  285. <TR>
  286. <TD colspan="2" id="idbtn" name="idbtn" align="right">
  287. <Button id="idbtnSave" name="idbtnSave" class="sys-font-body sys-color-body" disabled onclick="OnSave();" tabindex="4">&nbsp;&nbsp;&nbsp;&nbsp;Save Invitation&nbsp;&nbsp;&nbsp;&nbsp;</Button>
  288. </TD>
  289. </TR>
  290. </Table>
  291. </TD>
  292. </TR>
  293. </Table>
  294. </Body>
  295. </html>