Commit b9d843398a152b5ea699ad3aa9878cb98e12edf3
1 parent
3ae97308
Flex CB and AnatomyTest integration
Showing
1 changed file
with
282 additions
and
0 deletions
400-SOURCECODE/AIAHTML5+FlexCB/Default.aspxWithSiteUrl
0 → 100644
1 | +<%@ Page Language="C#" AutoEventWireup="True" Inherits="_Default" Codebehind="Default.aspx.cs" %> | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
4 | + | |
5 | +<html lang="en"> | |
6 | + | |
7 | + <head> | |
8 | + <title>A.D.A.M. Interactive Anatomy</title> | |
9 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
10 | + <meta http-equiv="X-UA-Compatible" content="IE=11"/> | |
11 | + | |
12 | + <script type="text/javascript"> | |
13 | + // var appVersion = 'v107'; | |
14 | + //Below code is for opening CB directly from AIAHTML5 as CB is not ready | |
15 | + //till Aug2018 and new AIAHTML5 is going live. v1018 is having the code which opens CB with user authentication | |
16 | + var appVersion = 'v1018'; | |
17 | + | |
18 | + </script> | |
19 | + | |
20 | + <script type="text/javascript" src="v1018/js/lib/jquery-1.8.1.min.js?vers=v1018"></script> | |
21 | + <script type="text/javascript" src="v1018/js/AC_OETags.js?vers=v1018"></script> | |
22 | + <script type="text/javascript" src="http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js?vers=v1018"></script> | |
23 | + <!--<script type="text/javascript" src="v1018/js/unity3D.js?vers=v1018"></script>--> | |
24 | + <script type="text/javascript" src="v1018/js/dynamicDiv.js?vers=v1018"></script> | |
25 | + <script type="text/javascript" src="v1018/js/functions.js?vers=v1018"></script> | |
26 | + <!--<script type="text/javascript" src="v1018/history/history.js?vers=v1018"></script>--> | |
27 | + <!--<script type="text/javascript" src="v1018/js/maintenanceProperties.js?vers=v1018></script> | |
28 | + <script type="text/javascript" src="v1018/js/messagePopUp.js?vers=v1018"></script>--> | |
29 | +<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script> | |
30 | + <link rel="stylesheet" type="text/css" href="v1018/history/history.css" /> | |
31 | + | |
32 | + <style type="text/css"> | |
33 | + html { height:100%; overflow:hidden; } | |
34 | + body { margin: 0px;padding:0px; height:100%; } | |
35 | + </style> | |
36 | + | |
37 | + <script type='text/VBScript'> | |
38 | + function DetectUnityWebPlayerActiveX | |
39 | + on error resume next | |
40 | + dim tControl | |
41 | + dim res | |
42 | + res = 0 | |
43 | + set tControl = CreateObject("UnityWebPlayer.UnityWebPlayer.1") | |
44 | + if IsObject(tControl) then | |
45 | + res = 1 | |
46 | + end if | |
47 | + DetectUnityWebPlayerActiveX = res | |
48 | + end function | |
49 | + </script> | |
50 | + <script type="text/javascript"> | |
51 | + if (tempTrace == null) { function tempTrace(message) { try { if (console != null && console.log != null) { console.log(message); } } catch (e) { } } } | |
52 | + </script> | |
53 | + <script type="text/javascript"> | |
54 | + | |
55 | + function resizeFlashDivHeight() { | |
56 | + $('#flashDiv').height(window.document.body.offsetHeight); | |
57 | + }; | |
58 | + | |
59 | + window.onresize = function () { setTimeout(resizeFlashDivHeight, 250); }; | |
60 | + $(document).ready(resizeFlashDivHeight); | |
61 | + | |
62 | + function logoutUserNormal() { | |
63 | + tempTrace("Default.aspx * DEBUG logoutUserNormal()"); | |
64 | + // $.post('http://' + window.location.host + '/LogoutUser.aspx', {}, ''); | |
65 | + //return "This request will cause to Logout from the application, You will have to login again to access the application."; | |
66 | + return "Warning: You are leaving this product without logging out. If you continue, your information will be lost and your account will lock for 5 minutes."; | |
67 | + } | |
68 | + function logoutUser(evt) { | |
69 | + tempTrace("Default.aspx * DEBUG logoutUser()"); | |
70 | + if (typeof evt == 'undefined') { | |
71 | + evt = window.event; | |
72 | + } | |
73 | + tempTrace("Default.aspx * DEBUG logoutUser() evt = " + evt); | |
74 | + //if (evt && evt.clientX >= (window.event.screenX - 150) && evt.clientY >= -150 && evt.clientY <= 0) { //NOTE: Chrome did not return any clientX info. | |
75 | + if (evt && evt.clientY >= -150 && evt.clientY <= 0) { //NOTE: Chrome did not return any clientX info. | |
76 | + //$.post('http://' + window.location.host + '/LogoutUser.aspx', {}, ''); | |
77 | + return "Warning: You are leaving this product without logging out. If you continue, your information will be lost and your account will lock for 5 minutes."; | |
78 | + } | |
79 | + } | |
80 | + if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.toLowerCase().indexOf("win") != -1) { | |
81 | + window.onbeforeunload = logoutUser;//function () { return logoutUser(); }; | |
82 | + } else { | |
83 | + window.onbeforeunload = logoutUserNormal; | |
84 | + } | |
85 | + | |
86 | + // Function to check the page opener and reload the parent if openner is an iframe. | |
87 | + function checkOpener() { | |
88 | + // Check if page is loading iside an iFrame. | |
89 | + if (top != self) { | |
90 | + parent.location.reload(); | |
91 | + } | |
92 | + } | |
93 | + </script> | |
94 | + <script language="JavaScript" type="text/javascript"> | |
95 | + | |
96 | + // ----------------------------------------------------------------------------- | |
97 | + // Globals | |
98 | + // Major version of Flash required | |
99 | + var requiredMajorVersion = 10; | |
100 | + // Minor version of Flash required | |
101 | + var requiredMinorVersion = 0; | |
102 | + // Minor version of Flash required | |
103 | + var requiredRevision = 0; | |
104 | + // ----------------------------------------------------------------------------- | |
105 | + | |
106 | + //----------------- Unity Player check ---------------------- | |
107 | + function DetectUnityWebPlayer() { | |
108 | + tempTrace("Default.aspx * DEBUG DetectUnityWebPlayer()"); | |
109 | + var tInstalled = false; | |
110 | + if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.toLowerCase().indexOf("win") != -1) { | |
111 | + tInstalled = DetectUnityWebPlayerActiveX(); | |
112 | + } | |
113 | + else { | |
114 | + if (navigator.mimeTypes && navigator.mimeTypes["application/vnd.unity"]) { | |
115 | + if (navigator.mimeTypes["application/vnd.unity"].enabledPlugin && navigator.plugins && navigator.plugins["Unity Player"]) { | |
116 | + tInstalled = true; | |
117 | + } | |
118 | + } | |
119 | + } | |
120 | + return tInstalled; | |
121 | + } | |
122 | + | |
123 | + function GetUnityInstallerPath() { | |
124 | + tempTrace("Default.aspx * DEBUG GetUnityInstallerPath()"); | |
125 | + var tDownloadURL = ""; | |
126 | + var hasXpi = navigator.userAgent.toLowerCase().indexOf("firefox") != -1; | |
127 | + | |
128 | + // Use standalone installer | |
129 | + if (navigator.platform == "MacIntel") | |
130 | + tDownloadURL = "http://webplayer.unity3d.com/download_webplayer-3.x/webplayer-i386.dmg"; | |
131 | + else if (navigator.platform == "MacPPC") | |
132 | + tDownloadURL = "http://webplayer.unity3d.com/download_webplayer-3.x/webplayer-ppc.dmg"; | |
133 | + else if (navigator.platform.toLowerCase().indexOf("win") != -1) | |
134 | + tDownloadURL = "http://webplayer.unity3d.com/download_webplayer-3.x/UnityWebPlayer.exe"; | |
135 | + return tDownloadURL; | |
136 | + } | |
137 | + </script> | |
138 | + | |
139 | + </head> | |
140 | +<body> | |
141 | +<script type="text/javascript"> | |
142 | + var maintenancePropertiesJs = document.createElement('script'); | |
143 | + maintenancePropertiesJs.src = appVersion +"/js/maintenanceProperties.js?v="+new Date().getTime(); | |
144 | + var messagePopUpJs = document.createElement('script'); | |
145 | + messagePopUpJs.src = appVersion +"/js/messagePopUp.js?v="+new Date().getTime(); | |
146 | + var head = document.getElementsByTagName('head')[0]; | |
147 | + head.appendChild(maintenancePropertiesJs); | |
148 | + setTimeout(function(){ | |
149 | + head.appendChild(messagePopUpJs); | |
150 | + },100); | |
151 | +</script> | |
152 | +<div id="flashDiv" style="z-index:0"> | |
153 | + <script type="text/javascript"> | |
154 | + | |
155 | + //Below is for opening CB directly from AIAHTML5 as CB is not ready | |
156 | + //till Aug2018 and new AIAHTML5 is going live. | |
157 | + //ll | |
158 | + var url =new URL(location.href).toString(); | |
159 | + var params = url.split("?")[1]; | |
160 | + var siteIp; | |
161 | + var account; | |
162 | + var edition; | |
163 | + var referer; | |
164 | + var remote; | |
165 | + var decryptedUserName; | |
166 | + var decryptedPassword; | |
167 | + var module; | |
168 | + var siteId; | |
169 | + | |
170 | + var key = CryptoJS.enc.Base64.parse("MTIzNDU2NzgxMjM0NTY3OAXUD"); | |
171 | + var iv = CryptoJS.enc.Base64.parse("EBESExQVFhcYGRobHB0eHwXUD"); | |
172 | + | |
173 | + // console.log("params= "+u.split("?")[1]) | |
174 | + //console.log("un= "+(params.split("&")[0]).substring(3,params.split("&")[0].length)) | |
175 | + // console.log("pass= "+params.split("&")[1].substring(3,params.split("&")[0].length)) | |
176 | + if(url.indexOf('?si')!=-1){ | |
177 | + | |
178 | + siteIp = (CryptoJS.AES.decrypt(params.split("&")[0].substring(3,params.split("&")[0].length), key, { iv: iv })).toString(CryptoJS.enc.Utf8);; | |
179 | + account = (CryptoJS.AES.decrypt(params.split("&")[1].substring(3,params.split("&")[1].length), key, { iv: iv })).toString(CryptoJS.enc.Utf8);; | |
180 | + edition = (CryptoJS.AES.decrypt(params.split("&")[2].substring(3,params.split("&")[2].length), key, { iv: iv })).toString(CryptoJS.enc.Utf8);; | |
181 | + referer = (CryptoJS.AES.decrypt(params.split("&")[3].substring(3,params.split("&")[3].length), key, { iv: iv })).toString(CryptoJS.enc.Utf8);; | |
182 | + remote = (CryptoJS.AES.decrypt(params.split("&")[4].substring(3,params.split("&")[4].length), key, { iv: iv })).toString(CryptoJS.enc.Utf8);; | |
183 | + module= (CryptoJS.AES.decrypt(params.split("&")[5].substring(4,params.split("&")[5].length); | |
184 | + siteId = (CryptoJS.AES.decrypt(params.split("&")[6].substring(2,params.split("&")[6].length), key, { iv: iv })).toString(CryptoJS.enc.Utf8);; | |
185 | + } | |
186 | + else{ | |
187 | + | |
188 | + //var UserName = params.split("&")[0].substring(3,params.split("&")[0].length);//new URL(location.href).searchParams.get('un'); | |
189 | + // var UserPassword = params.split("&")[1].substring(3,params.split("&")[0].length);//new URL(location.href).searchParams.get('up'); | |
190 | + // var module = params.split("&")[2].substring(4,params.split("&")[0].length); | |
191 | + var UserName = params.split("&")[0].substring(3,params.split("&")[0].length); | |
192 | + var UserPassword = params.split("&")[1].substring(3,params.split("&")[1].length); | |
193 | + module = params.split("&")[2].substring(4,params.split("&")[2].length); | |
194 | + | |
195 | + console.log("UserName= "+UserName+",UserPassword= "+UserPassword+", module ="+module); | |
196 | + | |
197 | + | |
198 | + decryptedUserName = (CryptoJS.AES.decrypt(UserName, key, { iv: iv })).toString(CryptoJS.enc.Utf8); | |
199 | + decryptedPassword = (CryptoJS.AES.decrypt(UserPassword, key, { iv: iv })).toString(CryptoJS.enc.Utf8); | |
200 | + | |
201 | + console.log("decryptedUserName="+decryptedUserName+",decryptedPassword="+decryptedPassword); | |
202 | + | |
203 | + | |
204 | + } | |
205 | + // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65) | |
206 | + var hasProductInstall = DetectFlashVer(6, 0, 65); | |
207 | + | |
208 | + // alert('has Player: ' + hasProductInstall); | |
209 | + | |
210 | + // Version check based upon the values defined in globals | |
211 | + var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); | |
212 | + | |
213 | + if (hasProductInstall && !hasRequestedVersion) { | |
214 | + // DO NOT MODIFY THE FOLLOWING FOUR LINES | |
215 | + // Location visited after installation is complete if installation is required | |
216 | + var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn"; | |
217 | + var MMredirectURL = window.location; | |
218 | + document.title = document.title.slice(0, 47) + " - Flash Player Installation"; | |
219 | + var MMdoctitle = document.title; | |
220 | + window.location.href = 'http://qa.interactiveanatomy.com/AdobePlayerDownloadLink.html'; | |
221 | + | |
222 | + } else if (hasRequestedVersion) { | |
223 | + tempTrace("Default.aspx * DEBUG hasRequestedVersion write will occur"); | |
224 | + // if we've detected an acceptable version | |
225 | + // embed the Flash Content SWF when all tests are passed | |
226 | + if(url.indexOf('?si')!=-1){ | |
227 | + | |
228 | + var params = "<%=urlParams%>"; | |
229 | + AC_FL_RunContent( | |
230 | + "src", appVersion + "/AppStartup" + params, | |
231 | + "width", "100%", | |
232 | + "height", "100%", | |
233 | + "align", "middle", | |
234 | + "id", "flashObject", | |
235 | + "quality", "high", | |
236 | + "bgcolor", "#000000", | |
237 | + "name", "flashObject", | |
238 | + "wmode", "opaque", | |
239 | + "allowScriptAccess", "sameDomain", | |
240 | + "type", "application/x-shockwave-flash", | |
241 | + "pluginspage", "http://www.adobe.com/go/getflashplayer", | |
242 | + "FlashVars","fromSiteIp=true+"&siteIp="+siteIp+"&account="+account+"&edition="+edition+"&referer="+referer+"&remote="+remote+"&mod="+module+"&siteId="+siteId | |
243 | + | |
244 | + ); | |
245 | + | |
246 | + } | |
247 | + else{ | |
248 | + var params = "<%=urlParams%>"; | |
249 | + AC_FL_RunContent( | |
250 | + "src", appVersion + "/AppStartup" + params, | |
251 | + "width", "100%", | |
252 | + "height", "100%", | |
253 | + "align", "middle", | |
254 | + "id", "flashObject", | |
255 | + "quality", "high", | |
256 | + "bgcolor", "#000000", | |
257 | + "name", "flashObject", | |
258 | + "wmode", "opaque", | |
259 | + "allowScriptAccess", "sameDomain", | |
260 | + "type", "application/x-shockwave-flash", | |
261 | + "pluginspage", "http://www.adobe.com/go/getflashplayer", | |
262 | + "FlashVars","fromSiteIp=false+"username="+decryptedUserName+"&password="+decryptedPassword+"&mod="+module | |
263 | + | |
264 | + ); | |
265 | + } | |
266 | + } else | |
267 | + { | |
268 | + // THE CODE ON 15th MACHINE flash is too old or we can't detect the plugin | |
269 | + tempTrace("Default.aspx * DEBUG objNewInstall write will occur"); | |
270 | + window.location.href = 'http://qa.interactiveanatomy.com/AdobePlayerDownloadLink.html'; | |
271 | + | |
272 | + | |
273 | + } | |
274 | + | |
275 | + </script> | |
276 | +<noscript><p>JavaScript is not activated.</p></noscript> | |
277 | + | |
278 | +</div> | |
279 | + <!-- Here Test --> | |
280 | + <div id="myConsole" runat="server"></div> | |
281 | +</body> | |
282 | +</html> | |
0 | 283 | \ No newline at end of file | ... | ... |