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.

374 lines
12 KiB

  1. <html>
  2. <head>
  3. #include "header.inc"
  4. #include "debug_js.inc"
  5. <TITLE id="idTitle" name="idTitle">REMOTE_ASSISTANCE_INVITE</TITLE>
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  7. <meta http-equiv="MSThemeCompatible" content="Yes">
  8. <LINK id="UI_StyleSheet1" REL="STYLESHEET" TYPE="text/css" HREF="../../Css/rcBuddy.css" >
  9. <LINK id="UI_StyleSheet2" REL="stylesheet" TYPE="text/css" HREF="hcp://system/css/shared.css">
  10. <Script id="idScript1" name="idScript1" language="javascript">
  11. /*
  12. * Localizable constants, text and messages
  13. */
  14. var L_ERRACCESSDENIED_Text = "Directly launching this page is not allowed. ";
  15. var L_INVALID_EXP_TIME_Text = "Remote Assistance properties have been set such that invitations cannot remain open for more than ";
  16. var L_INVALID_EXP_TIME2_Text = "\n\nThe invitation has been reset to expire at the maximum limit of ";
  17. var L_INVALID_EXP_TIME3_Text = "; if you want, you can select a lesser amount of time.";
  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. var i = document.URL.indexOf("?", 1);
  30. var ret = document.URL.slice(i+1);
  31. if (ret=="Resend")
  32. {
  33. XMLFile = parent.tempStore.XMLDataFile;
  34. var oInc = null;
  35. try
  36. {
  37. oInc = parent.pchealth.CreateObject_Incident();
  38. oInc.LoadFromXMLFile(XMLFile);
  39. }
  40. catch(error)
  41. {
  42. alert(parent.L_RCCTL_Text);
  43. return;
  44. }
  45. idFrom.value=oInc.UserName;
  46. var time=oInc.Misc("DtLength");
  47. if (time>59 && time<1381)
  48. {
  49. idSelectUnits.selectedIndex=1;
  50. UpdateCombo();
  51. idSelectValues.selectedIndex=((time/60)-1);
  52. }
  53. if(time<60)
  54. {
  55. idSelectUnits.selectedIndex=0;
  56. UpdateCombo();
  57. idSelectValues.selectedIndex=(time-1);
  58. }
  59. if(time>1380)
  60. {
  61. idSelectUnits.selectedIndex=2;
  62. UpdateCombo();
  63. idSelectValues.selectedIndex=((time/1440)-1);
  64. }
  65. if (oInc.Misc("PassStub")!="")
  66. {
  67. parent.tempPassStatus =true;
  68. }
  69. else
  70. {
  71. parent.tempPassStatus= false;
  72. }
  73. parent.ResendFlag=true;
  74. }
  75. else
  76. {
  77. idFrom.value = parent.GetLocalUser();
  78. //Loading the dropdown combo .....
  79. idSelectUnits.selectedIndex=1;
  80. UpdateCombo();
  81. }
  82. idFrom.focus();
  83. }
  84. catch(error)
  85. {
  86. alert(parent.L_RCCTL_Text);
  87. return;
  88. }
  89. TraceFunctLeave();
  90. }
  91. function UpdateCombo()
  92. {
  93. TraceFunctEnter("UpdateCombo");
  94. try
  95. {
  96. var col=new Enumerator(document.all("idSelectValues").tags("Option"));
  97. for (;!col.atEnd();col.moveNext())
  98. {
  99. x=col.item();
  100. idSelectValues.options.remove(x.index);
  101. }
  102. for (i=1;i<100;i++)
  103. {
  104. var oOption = document.createElement("OPTION");
  105. oOption.id="Val"+i;
  106. if (i<10)
  107. {
  108. oOption.text=" 0"+i+" ";
  109. }
  110. else
  111. {
  112. oOption.text=" "+i+" ";
  113. }
  114. oOption.value=i;
  115. idSelectValues.options.add(oOption);
  116. }
  117. /*
  118. //if the hour option is choosen
  119. if (idSelectUnits.item(idSelectUnits.selectedIndex).value==2)
  120. {
  121. var col=new Enumerator(document.all("idSelectValues").tags("Option"));
  122. for (;!col.atEnd();col.moveNext())
  123. {
  124. x=col.item();
  125. idSelectValues.options.remove(x.index);
  126. }
  127. for (i=1;i<=23;i++)
  128. {
  129. var oOption = document.createElement("OPTION");
  130. oOption.id="Val"+i;
  131. if (i<10)
  132. {
  133. oOption.text=" 0"+i+" ";
  134. }
  135. else
  136. {
  137. oOption.text=" "+i+" ";
  138. }
  139. oOption.value=i*60;
  140. idSelectValues.options.add(oOption);
  141. }
  142. }
  143. //if the minute option is choosen
  144. else if (idSelectUnits.item(idSelectUnits.selectedIndex).value==1)
  145. {
  146. var col=new Enumerator(document.all("idSelectValues").tags("Option"));
  147. for (;!col.atEnd();col.moveNext())
  148. {
  149. x=col.item();
  150. idSelectValues.options.remove(x.index);
  151. }
  152. for (i=1;i<=59;i++)
  153. {
  154. var oOption = document.createElement("OPTION");
  155. oOption.id="Val"+i;
  156. if (i<10)
  157. {
  158. oOption.text=" 0"+i+" ";
  159. }
  160. else
  161. {
  162. oOption.text=" "+i+" ";
  163. }
  164. oOption.value=i;
  165. idSelectValues.options.add(oOption);
  166. }
  167. }
  168. //if the days option is choosen
  169. else
  170. {
  171. var col=new Enumerator(document.all("idSelectValues").tags("Option"));
  172. for (;!col.atEnd();col.moveNext())
  173. {
  174. x=col.item();
  175. idSelectValues.options.remove(x.index);
  176. }
  177. for (i=1;i<=30;i++)
  178. {
  179. var oOption = document.createElement("OPTION");
  180. oOption.id="Val"+i;
  181. if (i<10)
  182. {
  183. oOption.text=" 0"+i+" ";
  184. }
  185. else
  186. {
  187. oOption.text=" "+i+" ";
  188. }
  189. oOption.value=i*24*60;
  190. idSelectValues.options.add(oOption);
  191. }
  192. }
  193. */
  194. }
  195. catch(error)
  196. {
  197. alert(parent.L_RCCTL_Text);
  198. return;
  199. }
  200. TraceFunctLeave();
  201. }
  202. function OnContinue()
  203. {
  204. TraceFunctEnter("OnContinue");
  205. try
  206. {
  207. parent.sFrom = parent.EscapedName( idFrom.value );
  208. parent.iExpirySaveFile = idSelectValues.options[idSelectValues.selectedIndex].value;
  209. if (idSelectUnits.item(idSelectUnits.selectedIndex).value==1)
  210. parent.iExpirySaveFile = parent.iExpirySaveFile;
  211. else if (idSelectUnits.item(idSelectUnits.selectedIndex).value==2)
  212. parent.iExpirySaveFile = parent.iExpirySaveFile*60;
  213. else
  214. parent.iExpirySaveFile = parent.iExpirySaveFile*24*60;
  215. var oRARegSetting = new ActiveXObject("RACplDlg.RARegSetting");
  216. var nMaxTicketExpirySettingInMins = oRARegSetting.MaxTicketExpiry / 60;
  217. if (nMaxTicketExpirySettingInMins < parent.iExpirySaveFile)
  218. {
  219. var nUnitVal;
  220. var nNumVal;
  221. var wshShell = new ActiveXObject("WScript.Shell");
  222. try { // check group policy value first.
  223. nUnitVal = wshShell.RegRead("HKLM\\Software\\policies\\Microsoft\\Windows NT\\Terminal Services\\MaxTicketExpiryUnits");
  224. nNumVal = wshShell.RegRead("HKLM\\Software\\policies\\Microsoft\\Windows NT\\Terminal Services\\MaxTicketExpiry");
  225. }
  226. catch(e)
  227. { // check control panel value.
  228. try {
  229. nUnitVal = wshShell.RegRead("HKLM\\SYSTEM\\ControlSet001\\Control\\Terminal Server\\MaxTicketExpiryUnits");
  230. nNumVal = wshShell.RegRead("HKLM\\SYSTEM\\ControlSet001\\Control\\Terminal Server\\MaxTicketExpiry");
  231. } catch (e)
  232. {
  233. // use default
  234. nUnitVal = 2; // DAYS.
  235. nNumVal = 30;
  236. }
  237. }
  238. var msg;
  239. var L_MIN_Text = " Mins";
  240. var L_HR_Text = " Hours";
  241. var L_DAY_Text = " Days";
  242. var sUnit = (nUnitVal==0?L_MIN_Text:(nUnitVal==1?L_HR_Text:L_DAY_Text));
  243. msg = L_INVALID_EXP_TIME_Text + nNumVal + sUnit +
  244. L_INVALID_EXP_TIME2_Text + nNumVal + sUnit + L_INVALID_EXP_TIME3_Text;
  245. alert(msg);
  246. idSelectUnits.selectedIndex = nUnitVal;
  247. idSelectValues.selectedIndex = nNumVal-1;
  248. return false;
  249. }
  250. navigate("rcScreen9.htm");
  251. }
  252. catch(error)
  253. {
  254. alert(parent.L_RCCTL_Text);
  255. return;
  256. }
  257. TraceFunctLeave();
  258. }
  259. </script>
  260. </head>
  261. <BODY id="idBody" name="idBody" scroll="auto" onload="onLoad();" class="margin sys-rhp-bgcolor">
  262. <table class="MaxLayout" id="idtableframe" name="idtableframe" cellpadding="16px" border="0">
  263. <tr>
  264. <td class="valignTop">
  265. <TABLE id="RA_Table" name="RA_Table" class="MaxWidth" border="0" cellspacing="0" cellpadding="0">
  266. <TR>
  267. <TD id="idTd1" name="idTd1" colspan="2">
  268. <Span id="idMainTitle" name="idMainTitle" class="sys-font-heading3 sys-rhp-color-title">Remote Assistance - Save Invitation</Span>
  269. </TD>
  270. </TR>
  271. <TR>
  272. <TD class="Height7" colspan="2">
  273. </TD>
  274. </TR>
  275. <TR>
  276. <TD id="idTd2" name="idTd2" colspan="2" class="sys-table-cell-bgcolor3">
  277. <span id="idSubTitle1" name="idSubTitle1" class="sys-font-body-bold sys-color-body valignmiddle">&nbsp;Enter your name</span>
  278. </TD>
  279. </TR>
  280. <TR>
  281. <TD class="Height9" colspan="2">
  282. </TD>
  283. </TR>
  284. <TR>
  285. <TD id="idTd3" name="idTd3">
  286. <span id="idFromText" name="idFromText" class="valignmiddle sys-font-body sys-color-body">From (the name you would like to appear on the invitation):</span>
  287. </TD>
  288. </TR>
  289. <TR>
  290. <TD class="Height5">
  291. </TD>
  292. </TR>
  293. <TR>
  294. <TD>
  295. <input type="text" name="idFrom" id="idFrom" class="sys-font-body sys-color-body MaxWidth" tabindex="1">
  296. </TD>
  297. </TR>
  298. <TR>
  299. <TD class="Height10" colspan="2">
  300. </TD>
  301. </TR>
  302. <TR>
  303. <TD id="idTd4" name="idTd4" colspan="2" class="sys-table-cell-bgcolor3">
  304. <span id="idSubTitle2" name="idSubTitle2" class="sys-font-body-bold sys-color-body valignmiddle">&nbsp;Set the invitation to expire</span>
  305. </TD>
  306. </TR>
  307. <TR>
  308. <TD class="Height9" colspan="2">
  309. </TD>
  310. </TR>
  311. <TR>
  312. <TD id="idTd5" name="idTd5" colspan="2">
  313. <Span id="idText1" name="idText1" class="valignmiddle sys-font-body sys-color-body">To lessen the chance that someone fraudulently gains access to your computer you can limit the time in which a recipient can accept a Remote Assistance invitation. Specify the duration that this invitation will remain open.</Span>
  314. </TD>
  315. </TR>
  316. <TR>
  317. <TD class="Height8" colspan="2">
  318. </TD>
  319. </TR>
  320. <TR>
  321. <TD colspan=2>
  322. <table cellspacing="0" cellpadding="0" class="" border="0">
  323. <TR>
  324. <TD class="Width5">
  325. <SELECT id="idSelectValues" name="idSelectValues" class="sys-font-body sys-color-body" tabindex="2">
  326. </SELECT>
  327. </TD>
  328. <TD class="Width5">
  329. <Select id="idSelectUnits" name="idSelectUnits" class="sys-font-body sys-color-body" onChange="//UpdateCombo();" tabindex="3">
  330. <option id="Unit1" value=1 >Minutes</option>
  331. <option id="Unit2" value=2 selected>Hours</option>
  332. <option id="Unit3" value=3 >Days</option>
  333. </Select>
  334. </TD>
  335. </TR>
  336. </table>
  337. </TD>
  338. </TR>
  339. <TR>
  340. <TD class="Height8" colspan="2">
  341. </TD>
  342. </TR>
  343. <TR>
  344. <TD colspan="2">
  345. <HR id="idHr" name="idHr" class="bordertype1 sys-toppane-color-border">
  346. </TD>
  347. </TR>
  348. <TR>
  349. <TD class="Height8" colspan="2">
  350. </TD>
  351. </TR>
  352. <TR>
  353. <TD colspan="2" id="idbtn" name="idbtn" align="right">
  354. <Button id="idbtnContinue" name="idbtnContinue" class="sys-font-body sys-color-body" onclick="OnContinue();" tabindex="4">&nbsp;&nbsp;&nbsp;&nbsp;Continue >&nbsp;&nbsp;&nbsp;&nbsp;</Button>
  355. </TD>
  356. </TR>
  357. </Table>
  358. </td>
  359. </tr>
  360. </Table>
  361. </Body>
  362. </html>