diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/ConfigurationController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/ConfigurationController.cs new file mode 100644 index 0000000..7199fc0 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.API/Controllers/ConfigurationController.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using System.Configuration; +namespace AIAHTML5.API.Controllers +{ + public class ConfigurationController : ApiController + { + [Route("api/Configuration/GetConfigurationvalues")] + [HttpGet] + public HttpResponseMessage GetConfigurationvalues() + { + int current_year = Int32.Parse(ConfigurationManager.AppSettings["Copyrightyear"]); + HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, current_year); + return response; + } + } +} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Templates/Forgot-UserId.html b/400-SOURCECODE/AIAHTML5.API/Templates/Forgot-UserId.html index 33441a3..cdc6023 100644 --- a/400-SOURCECODE/AIAHTML5.API/Templates/Forgot-UserId.html +++ b/400-SOURCECODE/AIAHTML5.API/Templates/Forgot-UserId.html @@ -57,7 +57,7 @@   - Give us a call toll-free at 1-888-278-9614 or send us an email if you have any questions or if you need help. It will be our pleasure to help you.  © 2017 Ebix, Inc. All Rights Reserved. + Give us a call toll-free at 1-888-278-9614 or send us an email if you have any questions or if you need help. It will be our pleasure to help you.  © <%=Int32.Parse(ConfigurationManager.AppSettings["Copyrightyear"])%> Ebix, Inc. All Rights Reserved. diff --git a/400-SOURCECODE/AIAHTML5.API/Templates/forgot-Password.html b/400-SOURCECODE/AIAHTML5.API/Templates/forgot-Password.html index 99a9102..f222317 100644 --- a/400-SOURCECODE/AIAHTML5.API/Templates/forgot-Password.html +++ b/400-SOURCECODE/AIAHTML5.API/Templates/forgot-Password.html @@ -75,7 +75,7 @@   - Give us a call toll-free at 1-888-278-9614 or send us an email if you have any questions or if you need help. It will be our pleasure to help you.  © 2017 Ebix, Inc. All Rights Reserved. + Give us a call toll-free at 1-888-278-9614 or send us an email if you have any questions or if you need help. It will be our pleasure to help you.  © <%=Int32.Parse(ConfigurationManager.AppSettings["Copyrightyear"])%> Ebix, Inc. All Rights Reserved. diff --git a/400-SOURCECODE/AIAHTML5.API/Templates/unblock-User.html b/400-SOURCECODE/AIAHTML5.API/Templates/unblock-User.html index a076de8..8a63339 100644 --- a/400-SOURCECODE/AIAHTML5.API/Templates/unblock-User.html +++ b/400-SOURCECODE/AIAHTML5.API/Templates/unblock-User.html @@ -77,7 +77,7 @@     - © 2017 Ebix, Inc. All Rights Reserved. + © <%=Int32.Parse(ConfigurationManager.AppSettings["Copyrightyear"])%> Ebix, Inc. All Rights Reserved. diff --git a/400-SOURCECODE/AIAHTML5.API/Web.config b/400-SOURCECODE/AIAHTML5.API/Web.config index 490d784..ee162e6 100644 --- a/400-SOURCECODE/AIAHTML5.API/Web.config +++ b/400-SOURCECODE/AIAHTML5.API/Web.config @@ -31,6 +31,8 @@ + + diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index dc5cb13..9752f2d 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -39,7 +39,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A ethnicity: null, modesty: null }; - $rootScope.current_year = AIAConstants.current_year; + // on refersh this variable will also get null that is why we are only checking this variable on initialize that if it is null that means page gets refershed. $rootScope.refreshcheck = null; var isCommingSoonModel = true; @@ -172,13 +172,19 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A $rootScope.promptUserForCookies(); } - + $rootScope.getConfigurationValues(); } - - $rootScope.AuthenticateUser = function (userInfo) + $rootScope.getConfigurationValues = function () { - - + AuthenticationService.getCofigValue() + .then( + function (configresult) { + $rootScope.current_year = configresult; + + }); + } + $rootScope.AuthenticateUser = function (userInfo) + { if (navigator.cookieEnabled) { $rootScope.errorMessage = ""; if (userInfo.username == "" || userInfo.username == null || userInfo.username == undefined || userInfo.password == "" || userInfo.password == null || userInfo.password == undefined) { @@ -372,9 +378,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A { $rootScope.promptUserForCookies(); } - + } - + $scope.saveRemeberMeDetails = function (result, userInfo) { localStorage.setItem('RememberMeLoginId', result.LoginId); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js index d340cdd..eac86ac 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js @@ -496,7 +496,6 @@ AIA.constant("UserModules", [ AIA.constant("AIAConstants", { "NO_BODY_SYSTEM_AVAILABLE": "Selected body system is not available on this layer.", "COOKIES_MESSAGE": "You need to enable your browser's cookies to run this application.", - "current_year": 2018, "SAVED_LAB_EXERCISE_NOT_FOUND": "Saved Lab Exercise not found.", "ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.", }) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js b/400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js index b8d269d..ead3a7e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js @@ -108,7 +108,25 @@ $("#messageModal").modal('show'); }); return deferred.promise; - } + }, + getCofigValue: function() + { + var deferred = $q.defer(); + $http({ + method: 'GET', + url: 'API/api/Configuration/GetConfigurationvalues' + }).success(function (data, status, headers, config) + { + console.log('success' + data); + deferred.resolve(data); + }).error(function (data, status, headers, config) + { + console.log('error') + deferred.reject(data); + + }); + return deferred.promise; + } - } + } }); \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index f44a0e6..f3df5d8 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -234,7 +234,7 @@ -
Copyright © 2017 Ebix Inc. All rights reserved.
+
Copyright © {{current_year}} Ebix Inc. All rights reserved.