Commit 6e4a2c2ad0d8cd51c4e96838281aedc408ecf328

Authored by Nikita Kulshreshtha
1 parent 95707814

now client site url users can access CB and Anatomy test of old AIA from new AIA

400-SOURCECODE/AIAHTML5.API/Controllers/ClientController.cs
... ... @@ -56,13 +56,14 @@ namespace AIAHTML5.API.Controllers
56 56 //user.LoginFailureCauseId = AIAConstants.INVALID_CLIENT;
57 57 //dynamic userinfo = user;
58 58 //response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(userInfo) };
59   -
  59 + logger.Debug("IVALID CLIENT");
60 60 response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.INVALID_CLIENT) };
61 61 }
62 62 }
63 63  
64 64 else
65 65 {
  66 + logger.Debug("NOT AUTHORIZED");
66 67 response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.MSG_NOT_AUTHORIZE_SITE_USER) };
67 68  
68 69 }
... ... @@ -73,7 +74,7 @@ namespace AIAHTML5.API.Controllers
73 74 response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = null };
74 75  
75 76 }
76   -
  77 + logger.Debug("response = " + response);
77 78 return response;
78 79 }
79 80 catch (SqlException e)
... ...
400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
... ... @@ -302,6 +302,7 @@ namespace AIAHTML5.API.Models
302 302 objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]);
303 303 objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"]));
304 304 objUser.IsActive = Convert.ToBoolean(dr["IsActive"]);
  305 + logger.Debug("objUser.Id= " + objUser.Id + ",objUser.FirstName= " + objUser.FirstName + ",objUser.LoginId= " + objUser.LoginId + ",objUser.Password= " + objUser.Password + ",objUser.SecurityQuestionId= " + objUser.SecurityQuestionId);
305 306 }
306 307 }
307 308 }
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/AnatTestController.js
... ... @@ -12,14 +12,19 @@ function ($scope, $rootScope, pages, log, $location) {
12 12 //alert("scroll");
13 13 }
14 14 //open flex
15   - $scope.openAIAFlexAnatomyTest = function () {
  15 +
  16 +
  17 +
  18 +
  19 +
  20 + $scope.openAIAFlexAnatomyTest = function () {
16 21 var userInfo;
17 22 var encryptedUserName;
18 23 var encryptedPassword
19 24 var urlPrams;
20 25  
21   - var key = CryptoJS.enc.Base64.parse("MTIzNDU2NzgxMjM0NTY3OAXUD");
22   - var iv = CryptoJS.enc.Base64.parse("EBESExQVFhcYGRobHB0eHwXUD");
  26 + var key = CryptoJS.enc.Base64.parse("MTIzNDU2NzgxMjM0NTY3OA");
  27 + var iv = CryptoJS.enc.Base64.parse("EBESExQVFhcYGRobHB0eHw");
23 28  
24 29 if ($rootScope.isCallFromSite) {
25 30  
... ... @@ -34,21 +39,25 @@ function ($scope, $rootScope, pages, log, $location) {
34 39 }
35 40 else {
36 41  
37   - $location.url('/');
38   -
39   - var encryptedSiteIP = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.siteIP, key, { iv: iv });
40   - var encryptedAccountNumber = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.accountNumber, key, { iv: iv });
41   - var encryptedEdition = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.edition, key, { iv: iv });
42   - var encryptedUrlReferer = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.urlReferer, key, { iv: iv });
43   - var encryptedRemoteIPAddress = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.remoteIPAddress, key, { iv: iv });
44   - var encryptedSiteId = CryptoJS.AES.encrypt($rootscope.siteId, key, { iv: iv });
45   -
46   -
47   - window.open('http://qa.interactiveanatomy.com/Default.aspx?si=' + encryptedSiteIP + '&ac=' + encryptedAccountNumber + '&ed=' + encryptedEdition + '&rf=' + encryptedUrlReferer + '&rm=' + encryptedRemoteIPAddress + '&mod=7' + '&s=' + encryptedSiteId);
48   -
  42 + var siteUrlInfo = JSON.parse(localStorage.getItem("siteUrlInfo"));
  43 + var encryptedSiteIP = CryptoJS.AES.encrypt(siteUrlInfo.siteIP, key, { iv: iv });
  44 + var encryptedAccountNumber = CryptoJS.AES.encrypt(siteUrlInfo.accountNumber, key, { iv: iv });
  45 + var encryptedEdition = siteUrlInfo.edition;
  46 + var encryptedUrlReferer = CryptoJS.AES.encrypt(siteUrlInfo.urlReferer, key, { iv: iv });
  47 + var encryptedSiteId = $rootScope.siteId;
  48 + var encryptedRemoteIPAddress = CryptoJS.AES.encrypt(siteUrlInfo.remoteIPAddress, key, { iv: iv });
  49 +
  50 + console.log("encryptedSiteIP = " + encryptedSiteIP + ",encryptedAccountNumber= " + encryptedAccountNumber + ",encryptedEdition= " + encryptedEdition + ",encryptedUrlReferer= " + encryptedUrlReferer + ", encryptedSiteId= " + encryptedSiteId + ", encryptedRemoteIPAddress=" + encryptedRemoteIPAddress);
  51 + /* var encryptedSiteIP = CryptoJS.AES.encrypt(siteIp, key, { iv: iv });
  52 + var encryptedAccountNumber = CryptoJS.AES.encrypt(accountNo, key, { iv: iv });
  53 + var encryptedEdition = editionId;//CryptoJS.AES.encrypt($rootScope.siteUrlInfo.edition, key, { iv: iv });
  54 + var encryptedUrlReferer = urlRef ;
  55 + var encryptedRemoteIPAddress = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.remoteIPAddress, key, { iv: iv });
  56 + var encryptedSiteId = $rootscope.siteId;*/
49 57  
  58 + $location.url('/');
50 59  
51   - //window.open('http://qa.interactiveanatomy.com/Default.aspx?si=' + encryptedSiteIP + '&ac=' + encryptedAccountNumber + '&ed=' + encryptedEdition + '&rf=' + encryptedUrlReferer + '&rm=' + encryptedRemoteIPAddress + 'mod=8');
  60 + window.open('http://qa.interactiveanatomy.com/Default.aspx?si=' + encryptedSiteIP + '&ac=' + encryptedAccountNumber + '&ed=' + encryptedEdition + '&rf=' + encryptedUrlReferer + '&rm=' + encryptedRemoteIPAddress + '&mod=8' + '&s=' + encryptedSiteId);
52 61  
53 62 }
54 63 }
... ... @@ -59,12 +68,12 @@ function ($scope, $rootScope, pages, log, $location) {
59 68  
60 69 $location.url('/');
61 70  
62   - window.open('http://qa.interactiveanatomy.com/Default.aspx?un=' + encryptedUserName + '&up=' + encryptedPassword + 'mod=8');
  71 + window.open('http://qa.interactiveanatomy.com/Default.aspx?un=' + encryptedUserName + '&up=' + encryptedPassword + '&mod=8');
63 72  
64 73 }
65 74 }
66 75 $scope.$on('$viewContentLoaded', function (event) {
67   -
  76 +
68 77 // code that will be executed ...
69 78 // every time this view is loaded
70 79  
... ... @@ -80,7 +89,7 @@ function ($scope, $rootScope, pages, log, $location) {
80 89 })
81 90 })
82 91  
83   - // $rootScope.currentActiveModuleTitle = pages[7].name;
  92 + // $rootScope.currentActiveModuleTitle = pages[7].name;
84 93 }]
85 94  
86 95 );
87 96 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
1 1 ๏ปฟAIA.controller("CurrBuildController", ["$scope", "$rootScope", "pages", "$log", "Modules", "$http", "$compile", "$location",
2 2 function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location) {
3   -
4   - // $rootScope.currentActiveModuleTitle = pages[6].name;
  3 +
  4 + // $rootScope.currentActiveModuleTitle = pages[6].name;
5 5 $scope.showTabButton = false;
6 6 $scope.listCurriculumBuilder = null;
7 7 $scope.dataPopup = null;
... ... @@ -18,14 +18,95 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location) {
18 18 //alert("scroll");
19 19 }
20 20  
  21 + /* $scope.openAIAFlexCB = function () {
  22 + var userInfo;
  23 + var encryptedUserName;
  24 + var encryptedPassword
  25 + var urlPrams;
  26 +
  27 + var key = CryptoJS.enc.Base64.parse("MTIzNDU2NzgxMjM0NTY3OA");
  28 +
  29 + var iv = CryptoJS.enc.Base64.parse("EBESExQVFhcYGRobHB0eHw");
  30 +
  31 +
  32 + userInfo = ($rootScope.userData);
  33 + console.log("userInfo.LoginId= "+userInfo.LoginId+" and userInfo.Password = " +userInfo.pwd );
  34 + var encryptedUserName = CryptoJS.AES.encrypt(userInfo.LoginId, key, { iv: iv });
  35 + var encryptedPassword = CryptoJS.AES.encrypt(userInfo.pwd, key, { iv: iv });
  36 + console.log("encryptedUserName= "+encryptedUserName+" and encryptedPassword= "+encryptedPassword);
  37 +
  38 +
  39 + var decryptedUserName = (CryptoJS.AES.decrypt(encryptedUserName, key, { iv: iv })).toString(CryptoJS.enc.Utf8);
  40 + var decryptedPassword = (CryptoJS.AES.decrypt(encryptedPassword, key, { iv: iv })).toString(CryptoJS.enc.Utf8);
  41 + console.log("decryptedUserName="+decryptedUserName+",decryptedPassword="+decryptedPassword);
  42 +
  43 + $location.url('/');
  44 +
  45 + window.open('http://qa.interactiveanatomy.com/Default.aspx?un=' + encryptedUserName + '&up=' + encryptedPassword+'&mod=7');
  46 +
  47 +
  48 + /* if ($rootScope.isCallFromSite) {
  49 +
  50 + if ($rootScope.IsCalsCred) {
  51 + encryptedUserName = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.username, key, { iv: iv });
  52 + encryptedPassword = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.password, key, { iv: iv });
  53 +
  54 + $location.url('/');
  55 +
  56 + window.open('http://qa.interactiveanatomy.com/Default.aspx?un=' + encryptedUserName + '&up=' + encryptedPassword + '&mod=7');
  57 +
  58 + }
  59 + else {
  60 +
  61 + $location.url('/');
  62 +
  63 + var encryptedSiteIP = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.siteIP, key, { iv: iv });
  64 + var encryptedAccountNumber = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.accountNumber, key, { iv: iv });
  65 + var encryptedEdition = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.edition, key, { iv: iv });
  66 + var encryptedUrlReferer = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.urlReferer, key, { iv: iv });
  67 + var encryptedRemoteIPAddress = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.remoteIPAddress, key, { iv: iv });
  68 + var encryptedSiteId = CryptoJS.AES.encrypt($rootscope.siteId, key, { iv: iv });
  69 +
  70 +
  71 + window.open('http://qa.interactiveanatomy.com/Default.aspx?si=' + encryptedSiteIP + '&ac=' + encryptedAccountNumber + '&ed=' + encryptedEdition + '&rf=' + encryptedUrlReferer + '&rm=' + encryptedRemoteIPAddress + '&mod=7' + '&s=' + encryptedSiteId);
  72 +
  73 + }
  74 + }
  75 + else {
  76 +
  77 + // var userInfo = ($rootScope.userData);
  78 +
  79 +
  80 + // var key = CryptoJS.enc.Base64.parse("MTIzNDU2NzgxMjM0NTY3OA");
  81 + // var iv = CryptoJS.enc.Base64.parse("EBESExQVFhcYGRobHB0eHw");
  82 +
  83 + // var encryptedUserName = CryptoJS.AES.encrypt(userInfo.LoginId, key, { iv: iv });
  84 + // var encryptedPassword = CryptoJS.AES.encrypt(userInfo.Password, key, { iv: iv });
  85 +
  86 +
  87 + userInfo = ($rootScope.userData);
  88 + var encryptedUserName = CryptoJS.AES.encrypt(userInfo.LoginId, key, { iv: iv });
  89 + var encryptedPassword = CryptoJS.AES.encrypt(userInfo.Password, key, { iv: iv });
  90 +
  91 + $location.url('/');
  92 +
  93 + window.open('http://qa.interactiveanatomy.com/Default.aspx?un=' + encryptedUserName + '&up=' + encryptedPassword+'&mod=7');
  94 +
  95 + }*/
  96 +
  97 +
  98 +
  99 +
  100 +
  101 + //}*/
21 102 $scope.openAIAFlexCB = function () {
22 103 var userInfo;
23 104 var encryptedUserName;
24 105 var encryptedPassword
25 106 var urlPrams;
26 107  
27   - var key = CryptoJS.enc.Base64.parse("MTIzNDU2NzgxMjM0NTY3OAXUD");
28   - var iv = CryptoJS.enc.Base64.parse("EBESExQVFhcYGRobHB0eHwXUD");
  108 + var key = CryptoJS.enc.Base64.parse("MTIzNDU2NzgxMjM0NTY3OA");
  109 + var iv = CryptoJS.enc.Base64.parse("EBESExQVFhcYGRobHB0eHw");
29 110  
30 111 if ($rootScope.isCallFromSite) {
31 112  
... ... @@ -40,15 +121,23 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location) {
40 121 }
41 122 else {
42 123  
43   - $location.url('/');
  124 + var siteUrlInfo = JSON.parse(localStorage.getItem("siteUrlInfo"));
  125 + var encryptedSiteIP = CryptoJS.AES.encrypt(siteUrlInfo.siteIP, key, { iv: iv });
  126 + var encryptedAccountNumber = CryptoJS.AES.encrypt(siteUrlInfo.accountNumber, key, { iv: iv });
  127 + var encryptedEdition = siteUrlInfo.edition;
  128 + var encryptedUrlReferer = CryptoJS.AES.encrypt(siteUrlInfo.urlReferer, key, { iv: iv });
  129 + var encryptedSiteId = $rootScope.siteId;
  130 + var encryptedRemoteIPAddress = CryptoJS.AES.encrypt(siteUrlInfo.remoteIPAddress, key, { iv: iv });
  131 +
  132 + console.log("encryptedSiteIP = " + encryptedSiteIP + ",encryptedAccountNumber= " + encryptedAccountNumber + ",encryptedEdition= " + encryptedEdition + ",encryptedUrlReferer= " + encryptedUrlReferer + ", encryptedSiteId= " + encryptedSiteId + ", encryptedRemoteIPAddress=" + encryptedRemoteIPAddress);
  133 + /* var encryptedSiteIP = CryptoJS.AES.encrypt(siteIp, key, { iv: iv });
  134 + var encryptedAccountNumber = CryptoJS.AES.encrypt(accountNo, key, { iv: iv });
  135 + var encryptedEdition = editionId;//CryptoJS.AES.encrypt($rootScope.siteUrlInfo.edition, key, { iv: iv });
  136 + var encryptedUrlReferer = urlRef ;
  137 + var encryptedRemoteIPAddress = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.remoteIPAddress, key, { iv: iv });
  138 + var encryptedSiteId = $rootscope.siteId;*/
44 139  
45   - var encryptedSiteIP = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.siteIP, key, { iv: iv });
46   - var encryptedAccountNumber = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.accountNumber, key, { iv: iv });
47   - var encryptedEdition = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.edition, key, { iv: iv });
48   - var encryptedUrlReferer = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.urlReferer, key, { iv: iv });
49   - var encryptedRemoteIPAddress = CryptoJS.AES.encrypt($rootScope.siteUrlInfo.remoteIPAddress, key, { iv: iv });
50   - var encryptedSiteId = CryptoJS.AES.encrypt($rootscope.siteId, key, { iv: iv });
51   -
  140 + $location.url('/');
52 141  
53 142 window.open('http://qa.interactiveanatomy.com/Default.aspx?si=' + encryptedSiteIP + '&ac=' + encryptedAccountNumber + '&ed=' + encryptedEdition + '&rf=' + encryptedUrlReferer + '&rm=' + encryptedRemoteIPAddress + '&mod=7' + '&s=' + encryptedSiteId);
54 143  
... ... @@ -61,15 +150,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location) {
61 150  
62 151 $location.url('/');
63 152  
64   - window.open('http://qa.interactiveanatomy.com/Default.aspx?un=' + encryptedUserName + '&up=' + encryptedPassword+'mod=7');
  153 + window.open('http://qa.interactiveanatomy.com/Default.aspx?un=' + encryptedUserName + '&up=' + encryptedPassword + '&mod=7');
65 154  
66 155 }
67   -
68   -
69   -
70   -
71   -
72 156 }
  157 +
73 158 //load json data
74 159 $scope.loadCurriculumBuiderData = function () {
75 160  
... ... @@ -126,7 +211,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location) {
126 211  
127 212 $scope.loadSlideShowXmldata = function (e) {
128 213  
129   - // alert(e);
  214 + // alert(e);
130 215 $http({ method: 'GET', url: 'content/data/json/cb/SlideShow/AIA_Curriculum_Builder_Guide.sldshw' }).success(function (data) {
131 216  
132 217 $scope.dataPopup = data;
... ... @@ -136,6 +221,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location) {
136 221 console.log(data);
137 222 });
138 223 }
  224 +
139 225 }]
140 226  
141 227  
... ...