' +
+ content: '
' +
''+
// '' +
'
',
@@ -406,33 +404,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$scope.SetAODwindowStoreData(windowviewid, 'currentSlug', 'AOD-view-detail');
$('html, body').animate({ scrollTop: 0 });
- postToIframe(aodurl,key,courseid,uid);
-
- // $.post(aodurl, { aiakeypass: "as@2$eDu8Jk",courseid: "as@2$09011209",uid: "as@2$2" }, function (result) {
-
- // });
-
-
- // $.post("https://uat.adamondemand.com/AodHome/CoursePlayerAIAP/", { aiakeypass: "as@2$eDu8Jk" }, function (result) {
-
- // if (result.Success === true) {
- // alert('ok')
- // $('#aodvideo_' + windowviewid).attr('src', videoUrl);
-
- // // window.open("https://adamondemand.com/AodHome/CoursePlayerAIATest?courseid=" + ProID + "&type=" + productype + "&uID=" + userid, "_self");
- // }
- // else
- // {
- // alert('failed')
- // }
-
- // });
-
-
- // $('#aodkey').attr('name',"aiakeypass")
- // $('#aodkey').val($rootScope.aodkeypass);
- // $('#aodform').attr('action',videoUrl).submit();
-
+ $('#aodvideo_' + windowviewid).attr('src', aodSiteUrl);
}
$('#AODView').css("height", $(window).outerHeight() - 20);
@@ -443,17 +415,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
}
- function postToIframe(url,key,courseid,uid){
- $('body').append('
');
- $('#aodform').append('
'+
- '
'+
- '
)'
- )
-
- //remove form after submit data
- $('#aodform').submit().remove();
- }
-
$scope.MyAODvideoOnLoad = function (windowviewid)
{
$scope.EnableUI();
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index ccbcf22..4c5d2b3 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -715,7 +715,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$rootScope.aiaAnimationPath = configresult.serverPath;
$rootScope.MaxOneFileSize = configresult.fileSize;
$rootScope.aodkeypass = configresult.aodkeypass;
- $rootScope.aodSiteUrl = configresult.aodSiteUrl;
+ $rootScope.aodDomainName = configresult.aodSiteUrl;
var loggedInUser = JSON.parse($scope.currentUserDetails);
//incase site user login userid is 0 so then using license id
@@ -724,7 +724,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$scope.checkuserstatus = {
userId: userId,
tagName: loggedInUser.Id==0?'logout':'update',
- SessionId:loggedInUser.SessionId
+ SessionId:loggedInUser.SessionId,
+ isSiteUser:loggedInUser.isSiteUser
}
// this case found when browser closed by user after login. after long time (after 20 min) open site again
@@ -949,7 +950,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$rootScope.aiaAnimationPath = configresult.serverPath;
$rootScope.MaxOneFileSize = configresult.fileSize;
$rootScope.aodkeypass = configresult.aodkeypass;
- $rootScope.aodSiteUrl = configresult.aodSiteUrl;
+ $rootScope.aodDomainName = configresult.aodSiteUrl;
});
}
@@ -1489,7 +1490,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$rootScope.aiaAnimationPath = configresult.serverPath;
$rootScope.MaxOneFileSize = configresult.fileSize;
$rootScope.aodkeypass = configresult.aodkeypass;
- $rootScope.aodSiteUrl = configresult.aodSiteUrl;
+ $rootScope.aodDomainName = configresult.aodSiteUrl;
userInfo.username = result.LoginId;
userInfo.password = result.Password;
@@ -1545,7 +1546,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$rootScope.aiaAnimationPath = configresult.serverPath;
$rootScope.MaxOneFileSize = configresult.fileSize;
$rootScope.aodkeypass = configresult.aodkeypass;
- $rootScope.aodSiteUrl = configresult.aodSiteUrl;
+ $rootScope.aodDomainName = configresult.aodSiteUrl;
var loggedInUser = JSON.parse($scope.currentUserDetails);
//check already login by account number bcz no login id for site login
@@ -1990,7 +1991,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$rootScope.userStatus = {
userId: null,
tagName: null,
- SessionId:null
+ SessionId:null,
+ isSiteUser:false
}
console.log('user session start');
$rootScope.CheckUserSession('insert');
@@ -2066,6 +2068,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$rootScope.userStatus.userId=$rootScope.userData.Id==0?$rootScope.userData.LicenseId:$rootScope.userData.Id;
$rootScope.userStatus.tagName=tagName;
$rootScope.userStatus.SessionId=$rootScope.userData.SessionId;
+ $rootScope.userStatus.isSiteUser=$rootScope.userData.isSiteUser;
AuthenticationService.ManageUserLoginStatus($rootScope.userStatus)
.then(
@@ -9132,7 +9135,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$("#profileUpdateModal").modal('hide');
$timeout(function () {
$rootScope.isRedirectToAdmin=true;
- window.location.href = "Admin";
+ window.location.href = "/Admin";
}, 300)
};
diff --git a/400-SOURCECODE/Admin/src/app/app.component.ts b/400-SOURCECODE/Admin/src/app/app.component.ts
index 6dcad5e..9e61f38 100644
--- a/400-SOURCECODE/Admin/src/app/app.component.ts
+++ b/400-SOURCECODE/Admin/src/app/app.component.ts
@@ -37,7 +37,7 @@ export class AppComponent implements OnInit {
constructor(private idle: Idle, private keepalive: Keepalive,private titleService: Title,private _confirmService: ConfirmService,private userservice: UserService,private _loadingService: LoadingService, public global: GlobalService, private router: Router,) {
const projectTitle= this.titleService.getTitle();
- console.log("idleTime: "+this.global.aiaIdleTime+" aiaIdleTimeOut: "+this.global.aiaIdleTimeOut+" Interval: "+this.global.aiaPingInterval);
+ //console.log("idleTime: "+this.global.aiaIdleTime+" aiaIdleTimeOut: "+this.global.aiaIdleTimeOut+" Interval: "+this.global.aiaPingInterval);
// sets an idle timeout of 20 minutes.
this.idle.setIdle(this.global.aiaIdleTime);
@@ -141,9 +141,10 @@ export class AppComponent implements OnInit {
this.userservice.ManageUserLoginStatus({
userId: this.global.UserId,
tagName: tagname,
- SessionId:this.global.SessionId
+ SessionId:this.global.SessionId,
+ isSiteUser:this.global.isSiteUser
}).subscribe(status => {
- console.log(status);
+ //console.log(status);
if(status=='False')
{
if(tagname=='logout')
diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts b/400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts
index a9b6138..8147c30 100644
--- a/400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts
+++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts
@@ -56,7 +56,7 @@ export class UserService {
//////////Manage UserLogin Status///////////
ManageUserLoginStatus(obj: any) {
- var jsonData = { 'userId': obj.userId, 'tagName': obj.tagName,'SessionId': obj.SessionId };
+ var jsonData = { 'userId': obj.userId, 'tagName': obj.tagName,'SessionId': obj.SessionId,'isSiteUser': obj.isSiteUser };
console.log(obj);
var headers = new Headers({
'Content-Type': 'application/json'
diff --git a/400-SOURCECODE/Admin/src/app/shared/global.ts b/400-SOURCECODE/Admin/src/app/shared/global.ts
index 7f61192..3ab3e04 100644
--- a/400-SOURCECODE/Admin/src/app/shared/global.ts
+++ b/400-SOURCECODE/Admin/src/app/shared/global.ts
@@ -28,23 +28,37 @@ export class GlobalService {
aiaIdleTimeOut:number=0;
aiaPingInterval:number=0;
SessionId:number=0;
+ isSiteUser:boolean=false;
RemoveColumns: Array
= ["Serial_No", "LicenseId","RowNum"]
error;
public href: string = "";
constructor(private csvService: CsvService, private http: Http) {
- this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails"));
- if (this.loggedInUser != null) {
- this.UserId = this.loggedInUser.Id;
- this.UserType = this.loggedInUser.UserTypeId;
- this.UserTypeName = this.loggedInUser.UserType;
- this.DisplayName = this.loggedInUser.FirstName + " " + this.loggedInUser.LastName;
- this.LoginId=this.loggedInUser.LoginId;
- this.aiaIdleTime=this.loggedInUser.aiaIdleTime;
- this.aiaIdleTimeOut=this.loggedInUser.aiaIdleTimeOut;
- this.aiaPingInterval=this.loggedInUser.aiaPingInterval;
- this.SessionId=this.loggedInUser.SessionId;
+ if(window.location.host=="localhost:4200")
+ {
+ // for 'ng serve --open' command
+ //**** for localhost:4200 *****//
+ var date = new Date();
+ var newsessionid = date.getTime();//timestamp is the number of milliseconds that have passed since January 1, 1970
+ localStorage.setItem('loggedInUserDetails', JSON.stringify(
+ {
+ "Id": 1, "FirstName": "Maribel", "LastName": "sfsfsfsfsfsfs", "EmailId": "ravi.vishwakarma@ebix.com", "LoginId": "superadmin", "Password": "ebix@2016","aiaIdleTime": 300,"aiaIdleTimeOut": 30,"aiaPingInterval": 10,"SessionId":newsessionid,"isSiteUser":false, "SecurityQuestionId": 1, "SecurityAnswer": "boxer", "CreatorId": 1, "CreationDate": "2009-03-02T00:00:00", "DeactivationDate": null, "ModifierId": 1, "ModifiedDate": "2017-01-24T02:03:19", "UserType": "Super Admin", "UserTypeId": 1, "IsActive": true, "IsCorrectPassword": false, "IncorrectLoginAttemptCount": 0, "IsBlocked": false, "LicenseId": 0, "EditionId": 0, "LoginFailureCauseId": 0, "Modules": [{ "slug": "da-view-list", "name": "Dissectible Anatomy", "id": 1 }, { "slug": "tile-view-list", "name": "Atlas Anatomy", "id": 2 }, { "slug": "3d-anatomy-list", "name": "3D Anatomy", "id": 3 }, { "slug": "clinical-illustrations", "name": "Clinical Illustrations", "id": 4 }, { "slug": "clinical-animations", "name": "Clinical Animations", "id": 5 }, { "slug": "Link/encyclopedia", "name": "Encyclopedia", "id": 6 }, { "slug": "curriculum-builder", "name": "Curriculum Builder", "id": 7 }, { "slug": "anatomy-test", "name": "Anatomy Test", "id": 8 }, { "slug": "Link/IP-10", "name": "IP 10", "id": 9 }, { "slug": "lab-exercises", "name": "Lab Exercises", "id": 10 }, { "slug": "Link/indepth-reports", "name": "In-Depth Reports", "id": 11 }, { "slug": "Link/complementary-and-alternate-medicine", "name": "CAM", "id": 12 }, { "slug": "ADAM-images", "name": "A.D.A.M. Images", "id": 13 }, { "slug": "Link/bodyguide", "name": "Body Guide", "id": 14 }, { "slug": "Link/health-navigator", "name": "Symptom Navigator", "id": 15 }, { "slug": "Link/wellness-tools", "name": "The Wellness Tools", "id": 16 }, { "slug": "Link/aod", "name": "A.D.A.M. OnDemand", "id": 1017 }], "LicenseInfo": { "Id": 0, "AccountNumber": "AIAS000319" }, "LicenseSubscriptions": null, "IsSubscriptionExpired": false, "SubscriptionExpirationDate": null, "TermsAndConditionsTitle": null, "TermsAndConditionsText": null
+ }));
+ }
+
+ this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails"));
+ if (this.loggedInUser != null) {
+ this.UserId = this.loggedInUser.Id;
+ this.UserType = this.loggedInUser.UserTypeId;
+ this.UserTypeName = this.loggedInUser.UserType;
+ this.DisplayName = this.loggedInUser.FirstName + " " + this.loggedInUser.LastName;
+ this.LoginId=this.loggedInUser.LoginId;
+ this.aiaIdleTime=this.loggedInUser.aiaIdleTime;
+ this.aiaIdleTimeOut=this.loggedInUser.aiaIdleTimeOut;
+ this.aiaPingInterval=this.loggedInUser.aiaPingInterval;
+ this.SessionId=this.loggedInUser.SessionId;
+ this.isSiteUser=this.loggedInUser.isSiteUser;
- }
+ }
this.NoRecords = 'No Record Found.';
@@ -69,20 +83,8 @@ export class GlobalService {
}
- if (this.resourceBaseUrl == this.ProtocolType+"localhost/API/Adminapi/") {
- if(window.location.host=="localhost:4200")
- {
- // for 'ng serve --open' command
- //**** for localhost:4200 *****//
- var date = new Date();
- var newsessionid = date.getTime();//timestamp is the number of milliseconds that have passed since January 1, 1970
- localStorage.setItem('loggedInUserDetails', JSON.stringify(
- {
- "Id": 1, "FirstName": "Maribel", "LastName": "sfsfsfsfsfsfs", "EmailId": "ravi.vishwakarma@ebix.com", "LoginId": "superadmin", "Password": "ebix@2016","aiaIdleTime": 300,"aiaIdleTimeOut": 30,"aiaPingInterval": 10,"SessionId":newsessionid, "SecurityQuestionId": 1, "SecurityAnswer": "boxer", "CreatorId": 1, "CreationDate": "2009-03-02T00:00:00", "DeactivationDate": null, "ModifierId": 1, "ModifiedDate": "2017-01-24T02:03:19", "UserType": "Super Admin", "UserTypeId": 1, "IsActive": true, "IsCorrectPassword": false, "IncorrectLoginAttemptCount": 0, "IsBlocked": false, "LicenseId": 0, "EditionId": 0, "LoginFailureCauseId": 0, "Modules": [{ "slug": "da-view-list", "name": "Dissectible Anatomy", "id": 1 }, { "slug": "tile-view-list", "name": "Atlas Anatomy", "id": 2 }, { "slug": "3d-anatomy-list", "name": "3D Anatomy", "id": 3 }, { "slug": "clinical-illustrations", "name": "Clinical Illustrations", "id": 4 }, { "slug": "clinical-animations", "name": "Clinical Animations", "id": 5 }, { "slug": "Link/encyclopedia", "name": "Encyclopedia", "id": 6 }, { "slug": "curriculum-builder", "name": "Curriculum Builder", "id": 7 }, { "slug": "anatomy-test", "name": "Anatomy Test", "id": 8 }, { "slug": "Link/IP-10", "name": "IP 10", "id": 9 }, { "slug": "lab-exercises", "name": "Lab Exercises", "id": 10 }, { "slug": "Link/indepth-reports", "name": "In-Depth Reports", "id": 11 }, { "slug": "Link/complementary-and-alternate-medicine", "name": "CAM", "id": 12 }, { "slug": "ADAM-images", "name": "A.D.A.M. Images", "id": 13 }, { "slug": "Link/bodyguide", "name": "Body Guide", "id": 14 }, { "slug": "Link/health-navigator", "name": "Symptom Navigator", "id": 15 }, { "slug": "Link/wellness-tools", "name": "The Wellness Tools", "id": 16 }, { "slug": "Link/aod", "name": "A.D.A.M. OnDemand", "id": 1017 }], "LicenseInfo": { "Id": 0, "AccountNumber": "AIAS000319" }, "LicenseSubscriptions": null, "IsSubscriptionExpired": false, "SubscriptionExpirationDate": null, "TermsAndConditionsTitle": null, "TermsAndConditionsText": null
- }));
- }
-
- this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails"));
+ if (this.resourceBaseUrl == this.ProtocolType+"localhost/API/Adminapi/") {
+
if (this.UserTypeName == "Client Admin" || this.UserTypeName == "District Admin") {
this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber
}