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.

297 lines
7.2 KiB

  1. <HTML>
  2. <HEAD>
  3. #include "header.inc"
  4. #include "constants.inc"
  5. #include "debug_js.inc"
  6. <TITLE id="idTitle" name="idTitle">REMOTE_ASSISTANCE_MAIN</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_StyleSheet" REL="stylesheet" TYPE="text/css" HREF="../../Css/rc.css">
  10. <LINK ID=Stylesheet_Ref4 href="hcp://system/css/shared.css" rel=STYLESHEET type=text/css>
  11. <STYLE>
  12. .margins
  13. {
  14. margin-top : 33px;
  15. margin-left : 33px;
  16. margin-right : 33px;
  17. margin-bottom : 0px;
  18. }
  19. </STYLE>
  20. #ifdef _WIN64
  21. </HEAD>
  22. <BODY scroll=no CLASS=margins>
  23. <center id="idCenter" name="idCenter">
  24. <DIV id="idWin64Msg" name="idWin64Msg" CLASS="sys-font-heading4" height10> Remote Assistance is not supported in the 64-bit versions of Windows XP or the Windows Server 2003 family operating systems.
  25. </DIV>
  26. </center>
  27. </BODY>
  28. #else
  29. <OBJECT ID="pchealth" name="pchealth" classid="CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7"></OBJECT>
  30. <script id="idScript1" name="idScript1" LANGUAGE="Javascript" SRC="../../Common/Constants.js"> </script>
  31. <script id="idScript2" name="idScript2" LANGUAGE="Javascript" SRC="../../Common/Common.js"> </script>
  32. <script id="idScript3" name="idScript3" Language=JavaScript>
  33. //var sEamil = null;
  34. //var oDeskMgr = null;
  35. //var gHelper = null;
  36. //var gHelperName = null;
  37. //var gIsIM = false;
  38. //var gIsFile = false;
  39. //var gTimerId = -1;
  40. var oChannel = null;
  41. var oRCSession = null;
  42. var sSalemID = "";
  43. var oSmapi = null;
  44. var tempStore=null; // to store the Incident object while resending the ticket
  45. var tempPassStatus=null; //flag : if the Incident object has password or not while resending the ticket
  46. var tempTime=null; // stores time when resending the ticket using email
  47. var ResendFlag=false; //flag : Notify if it is resend of a ticket
  48. var sIP = "";
  49. var sMethodFile = "File"; // this is a parameter, don't localize it.
  50. // Incident information
  51. var sTo = null;
  52. var sFrom = null;
  53. var sMsg = null;
  54. var iExpirySaveFile=null;
  55. var sFileLoc=null; // stores the location of the ticket that is saved
  56. // Channel information
  57. var sVendorID = "CN=Microsoft Corporation,L=Redmond,S=Washington,C=US";
  58. var sProductID = "Microsoft Remote Assistance";
  59. // Navigation control
  60. var g_bRAStart = null;
  61. // 465974
  62. var g_sTicket =null;
  63. //
  64. // Desktop Control Permissions
  65. //
  66. var DESKTOPSHARING_DEFAULT = 0x0000;
  67. var NO_DESKTOP_SHARING = 0x0001;
  68. var VIEWDESKTOP_PERMISSION_REQUIRE = 0x0002;
  69. var VIEWDESKTOP_PERMISSION_NOT_REQUIRE = 0x0004;
  70. var CONTROLDESKTOP_PERMISSION_REQUIRE = 0x0008;
  71. var CONTROLDESKTOP_PERMISSION_NOT_REQUIRE = 0x00010;
  72. var INCIDENTSTATUS_EXPIRED = 0;
  73. var INCIDENTSTATUS_OPEN = 1;
  74. var INCIDENTSTATUS_IPCHANGED = 2;
  75. //var L_NOSETTING_Text = "Can't get channel setting: ";
  76. //var L_REMOTEDSKMGR_FAIL = "CoCreate RemoteDesktopManager failed: ";
  77. //var L_ACCEPT_Text = "Accepted() failed: ";
  78. //var L_REJECT_Text = "Rejected() failed: ";
  79. /*
  80. Function :OnLoad1()
  81. Description :
  82. */
  83. function OnLoad()
  84. {
  85. TraceFunctEnter("OnLoad");
  86. TraceFunctLeave();
  87. }
  88. /*
  89. Function : DoUnload()
  90. Description:
  91. */
  92. function DoUnload()
  93. {
  94. TraceFunctEnter("DoUnload");
  95. try
  96. {
  97. if (oSmapi != null)
  98. {
  99. oSmapi.Logoff();
  100. }
  101. }
  102. catch(error)
  103. {
  104. alert(L_RCCTL_Text);
  105. return;
  106. }
  107. TraceFunctLeave();
  108. }
  109. function GetIPAddress()
  110. {
  111. try
  112. {
  113. TraceFunctEnter("GetIPAddress");
  114. if (sIP == "")
  115. {
  116. var ip;
  117. var oSetting = new ActiveXObject("rcbdyctl.setting");
  118. ip = oSetting.GetIPAddress;
  119. if (ip != null && ip.length > 0 && ip != "0.0.0.0")
  120. {
  121. sIP = ip;
  122. }
  123. }
  124. return sIP;
  125. }
  126. catch(error)
  127. {
  128. throw error;
  129. }
  130. finally
  131. {
  132. TraceFunctLeave();
  133. }
  134. }
  135. function SwitchToOfflinePage()
  136. {
  137. try
  138. {
  139. TraceFunctEnter("SwitchToOfflinePage");
  140. var sURL = "hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Common/rcscreen3.htm";
  141. idSrc.location.href = "hcp://system/errors/Connection.htm?online_url=" + sURL + "&topic_title=&topic_intro=&offline_url=";
  142. }
  143. catch(error)
  144. {
  145. throw error;
  146. }
  147. finally
  148. {
  149. TraceFunctLeave();
  150. }
  151. }
  152. function SaveLocalReference(oInc, XMLFile, bSaveAsFile)
  153. {
  154. try
  155. {
  156. TraceFunctEnter("SaveLocalReference");
  157. oInc.Misc("IP") = sIP;
  158. oInc.Misc("Status")= INCIDENTSTATUS_OPEN;
  159. if (bSaveAsFile)
  160. {
  161. oInc.Misc("Method") = sMethodFile;
  162. }
  163. #ifdef _HELPCNT
  164. oInc.Misc("HelpCnt") = 0;
  165. #endif
  166. oInc.GetXML(XMLFile);
  167. }
  168. catch(error)
  169. {
  170. throw error;
  171. }
  172. finally
  173. {
  174. TraceFunctLeave();
  175. }
  176. }
  177. #define SESSION_ID 4
  178. function InitRAIncident(iDuration, sUserName, sMsg, sPass)
  179. {
  180. TraceFunctEnter("InitRAIncident");
  181. var strError = null;
  182. var oRAIncident = null;
  183. try
  184. {
  185. if (iDuration == null)
  186. iDuration = 0;
  187. if (sUserName == null)
  188. sUserName = "";
  189. if (sMsg == null)
  190. sMsg = "";
  191. if (sPass == null)
  192. sPass = "";
  193. // open channel object
  194. if (oChannel == null)
  195. {
  196. strError = L_NOCHANNEL_Text;
  197. oChannel = pchealth.CreateObject_Channel(sVendorID, sProductID);
  198. strError = null;
  199. }
  200. strError = L_NORCSESSION_Text;
  201. oRAIncident = pchealth.CreateObject_RemoteAssistanceIncident("", iDuration, sUserName, sMsg, sPass);
  202. strError = null;
  203. // save pass stub for file
  204. if (sPass.length > 0)
  205. {
  206. var sTicket = oRAIncident.RcTicket;
  207. var sAry = sTicket.split(",");
  208. oRAIncident.Misc("PassStub") = sAry[SESSION_ID];
  209. }
  210. // check if it's a slow link
  211. oRAIncident.Misc.add("L", 0);
  212. try
  213. {
  214. if( true == pchealth.Connectivity.IsAModem )
  215. oRAIncident.Misc("L") = 1;
  216. }
  217. catch (e)
  218. { // do nothing, use default
  219. }
  220. }
  221. catch (error)
  222. {
  223. if (strError == null)
  224. strError = L_RCCTL_Text;
  225. throw ERROR_STRING(strError, error);
  226. }
  227. TraceFunctLeave();
  228. return oRAIncident;
  229. }
  230. function GetMapi()
  231. {
  232. TraceFunctEnter("GetMapi");
  233. if (oSmapi == null)
  234. {
  235. try
  236. {
  237. oSmapi = new ActiveXObject("RcBdyCtl.SMapi");
  238. }
  239. catch (error)
  240. {
  241. alert(ERROR_STRING(L_RCCTL_Text, error));
  242. return false;
  243. }
  244. }
  245. return oSmapi;
  246. TraceFunctLeave();
  247. }
  248. </script>
  249. </HEAD>
  250. <frameset id="idframeset" name="idframeset" COLS="100%" onload="OnLoad()" onunload="DoUnload()">
  251. <frame id="idSrc" name="idSrc" src="rcScreen2.htm">
  252. </frameset>
  253. #endif // _WIN64
  254. </HTML>