Commit 58cef76513f9d9530ffc9f38daabdbe4cac00f7d

Authored by Utkarsh Singh
1 parent f222589c

Committing files related to unblock user functionality implementation

150-DOCUMENTATION/002-DBScripts/DeleteIncorretLoginAttempts.sql 0 → 100644
  1 +-- ================================================
  2 +-- Template generated from Template Explorer using:
  3 +-- Create Procedure (New Menu).SQL
  4 +--
  5 +-- Use the Specify Values for Template Parameters
  6 +-- command (Ctrl-Shift-M) to fill in the parameter
  7 +-- values below.
  8 +--
  9 +-- This block of comments will not be included in
  10 +-- the definition of the procedure.
  11 +-- ================================================
  12 +SET ANSI_NULLS ON
  13 +GO
  14 +SET QUOTED_IDENTIFIER ON
  15 +GO
  16 +-- =============================================
  17 +-- Author: <EBIX SOFTWARE INDIA PVT. LTD>
  18 +-- Create date: <7/27/2017>
  19 +-- Description: <Description,,>
  20 +-- =============================================
  21 +CREATE PROCEDURE DeleteIncorrectLoginAttempts
  22 + -- Add the parameters for the stored procedure here
  23 + @iUserId INT
  24 +AS
  25 +BEGIN
  26 + -- SET NOCOUNT ON added to prevent extra result sets from
  27 + -- interfering with SELECT statements.
  28 + SET NOCOUNT OFF;
  29 +
  30 + -- Insert statements for procedure here
  31 + DELETE from IncorrectLoginAttempts where UserId =@iUserId
  32 +END
  33 +GO
0 34 \ No newline at end of file
... ...
150-DOCUMENTATION/002-DBScripts/GetAllLoginFailureCauses.sql 0 → 100644
  1 +-- ================================================
  2 +-- Template generated from Template Explorer using:
  3 +-- Create Procedure (New Menu).SQL
  4 +--
  5 +-- Use the Specify Values for Template Parameters
  6 +-- command (Ctrl-Shift-M) to fill in the parameter
  7 +-- values below.
  8 +--
  9 +-- This block of comments will not be included in
  10 +-- the definition of the procedure.
  11 +-- ================================================
  12 +SET ANSI_NULLS ON
  13 +GO
  14 +SET QUOTED_IDENTIFIER ON
  15 +GO
  16 +-- =============================================
  17 +-- Author: <EBIX SOFTWARE INDIA PVT. LTD.>
  18 +-- Create date: <07/31/2017>
  19 +-- Description: <Description,,>
  20 +-- =============================================
  21 +CREATE PROCEDURE GetAllLoginFailureCauses
  22 + -- Add the parameters for the stored procedure here
  23 +
  24 +AS
  25 +BEGIN
  26 + -- SET NOCOUNT ON added to prevent extra result sets from
  27 + -- interfering with SELECT statements.
  28 + SET NOCOUNT ON;
  29 +
  30 + -- Insert statements for procedure here
  31 + SELECT lfc.Id, lfc.Description FROM LoginFailureCause lfc
  32 +END
  33 +GO
... ...
150-DOCUMENTATION/002-DBScripts/GetBlockedUserByUserType.sql 0 → 100644
  1 +-- ================================================
  2 +-- Template generated from Template Explorer using:
  3 +-- Create Procedure (New Menu).SQL
  4 +--
  5 +-- Use the Specify Values for Template Parameters
  6 +-- command (Ctrl-Shift-M) to fill in the parameter
  7 +-- values below.
  8 +--
  9 +-- This block of comments will not be included in
  10 +-- the definition of the procedure.
  11 +-- ================================================
  12 +SET ANSI_NULLS ON
  13 +GO
  14 +SET QUOTED_IDENTIFIER ON
  15 +GO
  16 +-- =============================================
  17 +-- Author: <EBIX SOFTWARE INDIA PVT. LTD.>
  18 +-- Create date: <2/8/2017>
  19 +-- Description: <Description,,>
  20 +-- =============================================
  21 +CREATE PROCEDURE GetBlockedUserByUserType
  22 + -- Add the parameters for the stored procedure here
  23 + @iUserTypeId tinyint
  24 +AS
  25 +BEGIN
  26 + -- returns the metadata
  27 + IF 1=0 BEGIN
  28 + SET FMTONLY OFF
  29 + END
  30 + SELECT DISTINCT
  31 + AIAUser.Id,
  32 + AIAUser.FirstName,
  33 + AIAUser.LastName,
  34 + AIAUser.LoginId,
  35 + AIAUser.Password,
  36 + AIAUser.EmailId,
  37 + ISNULL(License.AccountNumber,'') AccountNumber,
  38 + IncorrectLoginAttempts.LoginTime
  39 + FROM
  40 + IncorrectLoginAttempts
  41 + INNER JOIN AIAUser ON IncorrectLoginAttempts.UserId = AIAUser.Id
  42 + INNER JOIN UserType ON AIAUser.UserTypeId = UserType.Id
  43 + LEFT JOIN AIAUserToLicenseEdition ON AIAUser.Id = AIAUserToLicenseEdition.UserId
  44 + LEFT JOIN LicenseToEdition ON AIAUserToLicenseEdition.LicenseEditionId = LicenseToEdition.Id
  45 + LEFT JOIN License ON LicenseToEdition.LicenseId = License.Id
  46 + WHERE
  47 + IncorrectLoginAttempts.CntIncorrectLogins >= 5
  48 + AND UserType.Priority >= (SELECT UserType.Priority FROM UserType WHERE UserType.Id=@iUserTypeId)
  49 + --AND ((@iLicenseId =0) OR (License.Id = @iLicenseId))
  50 + --AND License.IsActive = 1
  51 +END
0 52 \ No newline at end of file
... ...
150-DOCUMENTATION/002-DBScripts/GetLicenseIdEditionIdByUserId.sql 0 → 100644
  1 +-- ================================================
  2 +-- Template generated from Template Explorer using:
  3 +-- Create Procedure (New Menu).SQL
  4 +--
  5 +-- Use the Specify Values for Template Parameters
  6 +-- command (Ctrl-Shift-M) to fill in the parameter
  7 +-- values below.
  8 +--
  9 +-- This block of comments will not be included in
  10 +-- the definition of the procedure.
  11 +-- ================================================
  12 +SET ANSI_NULLS ON
  13 +GO
  14 +SET QUOTED_IDENTIFIER ON
  15 +GO
  16 +-- =============================================
  17 +-- Author: <EBIX SOFTWARE INDIA PVT. LTD.>
  18 +-- Create date: <07/31/2017>
  19 +-- Description: <Description,,>
  20 +-- =============================================
  21 +CREATE PROCEDURE GetLicenseIdEditionIdByUserId
  22 + -- Add the parameters for the stored procedure here
  23 + @iUserId int
  24 +AS
  25 +BEGIN
  26 + -- SET NOCOUNT ON added to prevent extra result sets from
  27 + -- interfering with SELECT statements.
  28 + SET NOCOUNT ON;
  29 +
  30 + -- Insert statements for procedure here
  31 + SELECT LicenseId, EditionId FROM LicenseToEdition
  32 + INNER JOIN AIAUserToLicenseEdition on AIAUserToLicenseEdition.LicenseEditionId = LicenseToEdition.Id
  33 + WHERE AIAUserToLicenseEdition.UserId = @iUserId
  34 +END
  35 +GO
... ...
150-DOCUMENTATION/002-DBScripts/GetUserDetailsByLoginId.sql 0 → 100644
  1 +-- =============================================
  2 +-- Author: <EBIX SOFTWARE INDIA PVT. LTD.>
  3 +-- Create date: <07/18/2017>
  4 +-- Description: <Gets user details based on loginId>
  5 +-- =============================================
  6 +CREATE PROCEDURE GetUserDetailsByLoginId
  7 + -- Add the parameters for the stored procedure here
  8 + @sLoginId VARCHAR(50)
  9 +AS
  10 +BEGIN
  11 + -- SET NOCOUNT ON added to prevent extra result sets from
  12 + -- interfering with SELECT statements.
  13 + SET NOCOUNT OFF;
  14 +
  15 + -- Insert statements for procedure here
  16 + SELECT CreationDate, CreatorId, DeactivationDate, EmailId, FirstName, Id, IsActive, LastName, LoginId, ModifiedDate, ModifierId, Password, SecurityAnswer, SecurityQuestionId, UserTypeId FROM AIAUser WHERE (LoginId = @sLoginId)
  17 +
  18 +END
  19 +
0 20 \ No newline at end of file
... ...
150-DOCUMENTATION/002-DBScripts/InsertIncorrectLoginAttempts.sql 0 → 100644
  1 +-- ================================================
  2 +-- Template generated from Template Explorer using:
  3 +-- Create Procedure (New Menu).SQL
  4 +--
  5 +-- Use the Specify Values for Template Parameters
  6 +-- command (Ctrl-Shift-M) to fill in the parameter
  7 +-- values below.
  8 +--
  9 +-- This block of comments will not be included in
  10 +-- the definition of the procedure.
  11 +-- ================================================
  12 +SET ANSI_NULLS ON
  13 +GO
  14 +SET QUOTED_IDENTIFIER ON
  15 +GO
  16 +-- =============================================
  17 +-- Author: <Utkarsh Singh>
  18 +-- Create date: <7/27/2017>
  19 +-- Description: <Description,,>
  20 +-- =============================================
  21 +CREATE PROCEDURE InsertIncorrectLoginAttempts
  22 + -- Add the parameters for the stored procedure here
  23 + @iUserId INT
  24 +AS
  25 +BEGIN
  26 + -- SET NOCOUNT ON added to prevent extra result sets from
  27 + -- interfering with SELECT statements.
  28 + SET NOCOUNT ON;
  29 +
  30 + -- Insert statements for procedure here
  31 + INSERT into IncorrectLoginAttempts ([UserId] , LoginTime , CntIncorrectLogins) values (@iUserId, getdate(), 1)
  32 +END
  33 +GO
... ...
150-DOCUMENTATION/002-DBScripts/InsertLoginDetail.sql 0 → 100644
  1 +-- ================================================
  2 +-- Template generated from Template Explorer using:
  3 +-- Create Procedure (New Menu).SQL
  4 +--
  5 +-- Use the Specify Values for Template Parameters
  6 +-- command (Ctrl-Shift-M) to fill in the parameter
  7 +-- values below.
  8 +--
  9 +-- This block of comments will not be included in
  10 +-- the definition of the procedure.
  11 +-- ================================================
  12 +SET ANSI_NULLS ON
  13 +GO
  14 +SET QUOTED_IDENTIFIER ON
  15 +GO
  16 +-- =============================================
  17 +-- Author: <Author,,Name>
  18 +-- Create date: <Create Date,,>
  19 +-- Description: <Description,,>
  20 +-- =============================================
  21 +CREATE PROCEDURE InsertLoginDetail
  22 + -- Add the parameters for the stored procedure here
  23 + @iUserId INT
  24 +AS
  25 +BEGIN
  26 + -- SET NOCOUNT ON added to prevent extra result sets from
  27 + -- interfering with SELECT statements.
  28 + SET NOCOUNT ON;
  29 +
  30 + -- Insert statements for procedure here
  31 + INSERT INTO LoginDetail (UserId, LoginTime) VALUES (@iUserId, GETDATE())
  32 +END
  33 +GO
... ...
150-DOCUMENTATION/002-DBScripts/UpdateIncorrectLoginAttempts.sql 0 → 100644
  1 +-- ================================================
  2 +-- Template generated from Template Explorer using:
  3 +-- Create Procedure (New Menu).SQL
  4 +--
  5 +-- Use the Specify Values for Template Parameters
  6 +-- command (Ctrl-Shift-M) to fill in the parameter
  7 +-- values below.
  8 +--
  9 +-- This block of comments will not be included in
  10 +-- the definition of the procedure.
  11 +-- ================================================
  12 +SET ANSI_NULLS ON
  13 +GO
  14 +SET QUOTED_IDENTIFIER ON
  15 +GO
  16 +-- =============================================
  17 +-- Author: <Author,,Name>
  18 +-- Create date: <Create Date,,>
  19 +-- Description: <Description,,>
  20 +-- =============================================
  21 +CREATE PROCEDURE UpdateIncorrectLoginAttempts
  22 + -- Add the parameters for the stored procedure here
  23 + @iUserId INT
  24 +AS
  25 +BEGIN
  26 + -- SET NOCOUNT ON added to prevent extra result sets from
  27 + -- interfering with SELECT statements.
  28 + SET NOCOUNT OFF;
  29 +
  30 + -- Insert statements for procedure here
  31 + UPDATE IncorrectLoginAttempts set LoginTime = getdate(), CntIncorrectLogins = CntIncorrectLogins+1 where UserId = @iUserId
  32 +END
  33 +GO
... ...
150-DOCUMENTATION/002-DBScripts/UpdateLicenseTermAcceptedStatus.sql 0 → 100644
  1 +-- =============================================
  2 +-- Author: <Utkarsh Singh>
  3 +-- Create date: <07/21/2017>
  4 +-- Description: <Updates isTermAccepted field of License table >
  5 +-- =============================================
  6 +CREATE PROCEDURE UpdateLicenseTermAcceptedStatus
  7 + -- Add the parameters for the stored procedure here
  8 + @sAccountNumber char(16)
  9 +AS
  10 +BEGIN
  11 + -- SET NOCOUNT ON added to prevent extra result sets from
  12 + -- interfering with SELECT statements.
  13 + SET NOCOUNT OFF;
  14 +
  15 + -- Insert statements for procedure here
  16 + UPDATE License SET IsTermsAccepted =1 WHERE AccountNumber = @sAccountNumber
  17 +END
0 18 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj
... ... @@ -100,6 +100,7 @@
100 100 <Content Include="index.html" />
101 101 <Content Include="Templates\forgot-Password.html" />
102 102 <Content Include="Templates\forgot-UserId.html" />
  103 + <Content Include="Templates\unblock-User.html" />
103 104 <Content Include="Web.config">
104 105 <SubType>Designer</SubType>
105 106 </Content>
... ... @@ -107,12 +108,14 @@
107 108 <ItemGroup>
108 109 <Compile Include="App_Start\WebApiConfig.cs" />
109 110 <Compile Include="Constants\AIAConstants.cs" />
  111 + <Compile Include="Constants\ErrorHelper.cs" />
110 112 <Compile Include="Controllers\AdminAccessController.cs" />
111 113 <Compile Include="Controllers\AuthenticateController.cs" />
112 114 <Compile Include="Controllers\ForgotUserController.cs" />
113 115 <Compile Include="Controllers\LicenseTermConditionController.cs" />
114 116 <Compile Include="Controllers\PixelLocationsController.cs" />
115 117 <Compile Include="Controllers\ResetPasswordController.cs" />
  118 + <Compile Include="Controllers\UnblockUserController.cs" />
116 119 <Compile Include="Global.asax.cs">
117 120 <DependentUpon>Global.asax</DependentUpon>
118 121 </Compile>
... ...
400-SOURCECODE/AIAHTML5.API/Constants/AIAConstants.cs
... ... @@ -16,6 +16,7 @@ namespace AIAHTML5.API.Constants
16 16 public const string KEY_TITLE = "title";
17 17 public const string KEY_NAME = "name";
18 18 public const string KEY_SLUG = "slug";
  19 + public const string KEY_DESCRIPTION = "Description";
19 20  
20 21 public const string PASSWORD_UPDATE_SUCCESS = "Password updated successfully";
21 22 public const string PASSWORD_UPDATE_FAILED = "Password update failed";
... ... @@ -26,5 +27,12 @@ namespace AIAHTML5.API.Constants
26 27 public const string LICENSE_TERM_CONDITION_UPDATE_FAILED = "License Term Accepted field update failed.";
27 28  
28 29 public const string KEY_CONTENT = "content";
  30 +
  31 + public const string LICENSE_KEY_ID = "LicenseId";
  32 + public const string EDITION_KEY_ID = "EditionId";
  33 +
  34 + public const string USER_UNBLOCK_SUCCESS = "User unblocked";
  35 + public const string USER_UNBLOCK_FAILED = "Unblock operation failed";
  36 + public const string USER_ALREADY_UNBLOCKED = "User already unblocked.";
29 37 }
30 38 }
31 39 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.API/Constants/ErrorHelper.cs 0 → 100644
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Collections;
  4 +using System.Linq;
  5 +using System.Web;
  6 +
  7 +namespace AIAHTML5.API.Constants
  8 +{
  9 + /// <summary>
  10 + /// This class is used to provide error description. This class contain
  11 + /// different type of error code and its description.
  12 + /// </summary>
  13 + public class ErrorHelper
  14 + {
  15 + private static ErrorHelper _instance;
  16 + private Hashtable objHash = new Hashtable();
  17 +
  18 +
  19 + /* error Id Const */
  20 + public const Int16 E_NO_ERROR = 0;
  21 + public const Int16 E_USER_NOT_EXIST = 1;
  22 + public const Int16 E_PASSWORD_NOT_MATCH = 2;
  23 + public const Int16 E_USER_ID_BLOCKED_24_HRS = 3;
  24 + public const Int16 E_USER_NOT_ACTIVE = 4;
  25 + public const Int16 E_USER_ID_WILL_BLOCKED = 5;
  26 + public const Int16 E_EMAIL_ID_NOT_EXIT = 6;
  27 + public const Int16 E_LICENCE_IS_INACTIVE = 7;
  28 + public const Int16 E_USER_NOT_MAP_TO_LICENCE_EDITION = 8;
  29 + public const Int16 E_NO_ROW_FOUND_LICENCE_TO_EDITION_TABLE = 9;
  30 + public const Int16 E_NO_ROW_FOUND_LICENCE_TABLE = 10;
  31 + public const Int16 E_SECURITY_QUEST_NOT_MATCH = 11;
  32 + public const Int16 E_SEQURITY_ANSWER_NOT_MATCH = 12;
  33 + public const Int16 E_FORGOT_USER_ID_EMAIL_ID_NOT_EXIT = 13;
  34 + public const Int16 E_TOTAL_NUMBER_LOGIN_EXCEED = 14;
  35 + public const Int16 E_FORGOT_PASSWORD_EMAIL_ID_NOT_EXIST = 15;
  36 + public const Int16 E_TEST_SETUP_ACCOUNT_USER_NAME_EXIST = 16;
  37 + public const Int16 E_TEST_SETUP_ACCOUNT_EMAILID_EXIST = 17;
  38 + public const Int16 E_SP_ERROR = 18;
  39 + public const Int16 E_ACCOUNT_NUMBER_NOT_EXIST = 19;
  40 + public const Int16 E_ACCOUNT_NUMBER_ALREADY_EXIST = 20;
  41 + public const Int16 E_TEST_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT = 21;
  42 + public const Int16 E_MAIL_COULD_NOT_SENT = 22;
  43 + public const Int16 E_RESELLER_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT = 23;
  44 + public const Int16 E_LICENSE_TERM_CONDITION = 24;
  45 + public const Int16 E_EDITION_NOT_LINKED_WITH_SITE = 25;
  46 + public const Int16 E_LOGIN_SESSION_EXPIRE = 26;
  47 + public const Int16 E_DISCOUNT_CODE_NOT_EXIST = 27;
  48 + public const Int16 E_DISCOUNT_CODE_ALREADY_EXIST = 28;
  49 +
  50 + public const Int16 E_SITE_IP_NOT_NULL = 29;
  51 + public const Int16 E_EDITION_ID_NOT_NULL = 30;
  52 + public const Int16 E_MASTER_SITEIP_NOT_EXIST = 31;
  53 + public const Int16 EDITION_ID_NOT_EXIST = 32;
  54 + public const Int16 E_ERROR_LOG = 33;
  55 + public const Int16 E_MASTER_SITE_ALREADY_EXIST = 34;
  56 + public const Int16 E_ACCOUNT_NUMBER_NOT_NULL = 35;
  57 + public const Int16 E_SITE_IP_ALREADY_EXIST = 36;
  58 +
  59 +
  60 + public const Int16 E_LICENCE_IS_EXPIRED = 37;
  61 + public const Int16 E_SINGLEACCOUNT_IS_BEING_USED = 38;
  62 +
  63 +
  64 + public const Int16 E_DATA_BASE_CONNECTION = 4060;
  65 +
  66 +
  67 + //login failure error constant
  68 + public const int ACCOUNT_NUMBER_NOT_NULL = 4;
  69 + public const int EDITION_ID_NOT_NULL = 5;
  70 + public const int ACCOUNT_NUMBER_NOT_EXIST = 1;
  71 + public const int EDITION_NOT_EXIST = 3;
  72 + public const int MASTER_SITEIP_NOT_EXIST = 2;
  73 + public const int LICENSE_INACTIVE = 6;
  74 +
  75 +
  76 + /// <summary>
  77 + /// constructor
  78 + /// </summary>
  79 + private ErrorHelper()
  80 + {
  81 + objHash.Add(E_NO_ERROR, "No Error.");
  82 + objHash.Add(E_USER_NOT_EXIST, "Invalid User ID.");
  83 + objHash.Add(E_PASSWORD_NOT_MATCH, "Invalid Password. User ID and password will be disabled if your password is entered incorrectly for five consecutive attempts. If you have forgotten your password, please click on the forgot password link. ");
  84 + objHash.Add(E_USER_ID_BLOCKED_24_HRS, "User Id is blocked.");
  85 + objHash.Add(E_USER_NOT_ACTIVE, "User Id is Inactive.");
  86 + objHash.Add(E_USER_ID_WILL_BLOCKED, "Invalid Password. Your login will be blocked for a day if you enter wrong password one more time. Click on forgot password link if you have forgotten your password. ");
  87 + objHash.Add(E_EMAIL_ID_NOT_EXIT, "Invalid e-mail ID. If you do not know your correct e-mail ID please contact A.D.A.M. technical support at techsupport@adamcorp.com or your institution's site administrator. ");
  88 + objHash.Add(E_LICENCE_IS_INACTIVE, "Your Licence Is inactive.");
  89 + objHash.Add(E_USER_NOT_MAP_TO_LICENCE_EDITION, "User is not mapped with licence edition.");
  90 + objHash.Add(E_NO_ROW_FOUND_LICENCE_TO_EDITION_TABLE, "No row found in Licence to edition table.");
  91 + objHash.Add(E_NO_ROW_FOUND_LICENCE_TABLE, "No row found in Licence table.");
  92 + objHash.Add(E_SECURITY_QUEST_NOT_MATCH, "Your security question is incorrect. ");
  93 + objHash.Add(E_SEQURITY_ANSWER_NOT_MATCH, "Your answer is incorrect. ");
  94 + objHash.Add(E_FORGOT_USER_ID_EMAIL_ID_NOT_EXIT, "Invalid e-mail ID. If you do not know your correct e-mail ID please contact A.D.A.M. technical support at {0} or your institution's site administrator. ");
  95 + //objHash.Add(E_TOTAL_NUMBER_LOGIN_EXCEED, "User ID and password has been accessed by another user. Your session is currently timed out.");
  96 + objHash.Add(E_TOTAL_NUMBER_LOGIN_EXCEED, "Currently all licenses are in use. Any account that improperly logged out should automatically reset within 5 minutes.");
  97 + objHash.Add(E_FORGOT_PASSWORD_EMAIL_ID_NOT_EXIST, "Invalid e-mail ID. Please be sure to enter the e-mail ID used when you registered your license. ");
  98 + objHash.Add(E_TEST_SETUP_ACCOUNT_USER_NAME_EXIST, "User Name already exist in system.");
  99 + objHash.Add(E_TEST_SETUP_ACCOUNT_EMAILID_EXIST, "Email Id already exist system.");
  100 + objHash.Add(E_SP_ERROR, "Error occured in store procedure.");
  101 + objHash.Add(E_ACCOUNT_NUMBER_NOT_EXIST, "Account Number does not exist in the system. ");
  102 + objHash.Add(E_ACCOUNT_NUMBER_ALREADY_EXIST, "Account Number already exist in the system.");
  103 + objHash.Add(E_TEST_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT, "Test account has been created. Account number is: {0}. Mail could not be sent due to some mail server error. ");
  104 + objHash.Add(E_MAIL_COULD_NOT_SENT, "Mail could not sent due to some mail server error.");
  105 + objHash.Add(E_RESELLER_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT, "Licenses Have been created. Mail could not be sent due to some mail server error. ");
  106 + objHash.Add(E_LICENSE_TERM_CONDITION, "Your license is not enabled yet. Please contact your administrator to accept the term & condition.");
  107 + objHash.Add(E_EDITION_NOT_LINKED_WITH_SITE, "Your credentials are invalid. Please contact the site administrator of your institution or contact A.D.A.M. technical support at techsupport@adamcorp.com. ");
  108 + objHash.Add(E_LOGIN_SESSION_EXPIRE, "Your session has expired. Please log in.");
  109 + objHash.Add(E_DISCOUNT_CODE_NOT_EXIST, "Discount code not exist in the system.");
  110 + objHash.Add(E_DISCOUNT_CODE_ALREADY_EXIST, "Discount code already exist in the system.");
  111 + objHash.Add(E_SITE_IP_NOT_NULL, "SiteIP cannot be null.");
  112 + objHash.Add(E_DATA_BASE_CONNECTION, "Could not connect to Database.");
  113 + objHash.Add(E_EDITION_ID_NOT_NULL, "Edition Id cannot be zero.");
  114 + objHash.Add(E_MASTER_SITEIP_NOT_EXIST, "Master Site IP does not exist in the system.");
  115 + objHash.Add(EDITION_ID_NOT_EXIST, "Edition ID does not exist in the system.");
  116 + objHash.Add(E_ERROR_LOG, "Problem in database.");
  117 + objHash.Add(E_MASTER_SITE_ALREADY_EXIST, "Account already created from this URL.");
  118 + objHash.Add(E_ACCOUNT_NUMBER_NOT_NULL, "Account number cannot be null.");
  119 + objHash.Add(E_SITE_IP_ALREADY_EXIST, "Site IP already exist.");
  120 + objHash.Add(E_LICENCE_IS_EXPIRED, "Your licence is expired since {licenseExpirationDate}.");
  121 + objHash.Add(E_SINGLEACCOUNT_IS_BEING_USED, "This account is currently locked due to improper logout or another active browser session. The account should automatically reset within 5 minutes.");
  122 + }
  123 + /// <summary>
  124 + /// This method checks if instance of ErrorHelper class is exist then it returns
  125 + /// the exist instance else it creates the ErrorHelper class instance and return it.
  126 + /// </summary>
  127 + /// <returns>ErrorHelper instance</returns>
  128 + public static ErrorHelper GetInstance()
  129 + {
  130 + if (_instance == null)
  131 + {
  132 + _instance = new ErrorHelper();
  133 + }
  134 + return _instance;
  135 + }
  136 + }
  137 +}
0 138 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.API/Controllers/ForgotUserController.cs
... ... @@ -75,7 +75,7 @@ namespace AIAHTML5.API.Controllers
75 75 ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
76 76 logger.Debug("inside POST in ForgotUserController for emailId = " + userInfo["emailId"]);
77 77  
78   - User userData = AIAHTML5.API.Models.Users.GetUserByEmail(userInfo);
  78 + dynamic userData = AIAHTML5.API.Models.Users.GetUserByEmail(userInfo);
79 79 if (Convert.ToString(userData) != AIAConstants.USER_NOT_FOUND && Convert.ToString(userData) != AIAConstants.ERROR_IN_FECTHING_DETAILS)
80 80 {
81 81 //logger.Debug("inside if in ForgotUserController userData.loginId= " + userData.LoginId);
... ... @@ -85,9 +85,17 @@ namespace AIAHTML5.API.Controllers
85 85  
86 86 if (Convert.ToBoolean(userInfo["havePassword"]))
87 87 {
88   - logger.Debug("2. havePassword= " + Convert.ToBoolean(userInfo["havePassword"]));
  88 + if (Convert.ToBoolean(userInfo["unblockUser"]))
  89 + {
  90 + logger.Debug("2. unblockUser= " + Convert.ToBoolean(userInfo["unblockUser"]));
  91 + isMailSent = AIAHTML5.API.Models.UserUtility.SendEmail(userData, Convert.ToBoolean(userInfo["havePassword"]), Convert.ToBoolean(userInfo["unblockUser"]));
  92 + }
  93 + else
  94 + {
  95 + logger.Debug("2. havePassword= " + Convert.ToBoolean(userInfo["havePassword"]));
  96 + isMailSent = AIAHTML5.API.Models.UserUtility.SendEmail(userData, Convert.ToBoolean(userInfo["havePassword"]));
  97 + }
89 98  
90   - isMailSent = AIAHTML5.API.Models.UserUtility.SendEmail(userData, Convert.ToBoolean(userInfo["havePassword"]));
91 99 }
92 100 else
93 101 {
... ...
400-SOURCECODE/AIAHTML5.API/Controllers/UnblockUserController.cs 0 → 100644
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Linq;
  4 +using System.Net;
  5 +using System.Net.Http;
  6 +using System.Web.Http;
  7 +using AIAHTML5.API.Constants;
  8 +using AIAHTML5.API.Models;
  9 +using AIAHTML5.API.Utility;
  10 +using log4net;
  11 +
  12 +namespace AIAHTML5.API.Controllers
  13 +{
  14 + public class UnblockUserController : ApiController
  15 + {
  16 + // GET api/unblockuser
  17 + public IEnumerable<string> Get()
  18 + {
  19 + return new string[] { "value1", "value2" };
  20 + }
  21 +
  22 + // GET api/unblockuser/5
  23 + public string Get(int id)
  24 + {
  25 + return "value";
  26 + }
  27 +
  28 + // POST api/unblockuser
  29 + public HttpResponseMessage Post([FromBody]string emailId)
  30 + {
  31 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  32 + logger.Debug("inside POST in UnblockUserController for emailId = " + emailId);
  33 +
  34 + HttpResponseMessage response = null;
  35 +
  36 + dynamic user = AIAHTML5.API.Models.DBModel.GetUserDetailsByEmailId(emailId);
  37 + if (Convert.ToString(user) != AIAConstants.USER_NOT_FOUND && Convert.ToString(user) != AIAConstants.ERROR_IN_FECTHING_DETAILS)
  38 + {
  39 + int result = 0;
  40 +
  41 + logger.Debug("1. inside if in UnblockUserController userDetails= " + user.ToString());
  42 +
  43 + result = AIAHTML5.API.Models.DBModel.UnblockUser(user.Id);
  44 +
  45 + if (result > 0)
  46 + response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.USER_UNBLOCK_SUCCESS) };
  47 + else
  48 + response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.USER_ALREADY_UNBLOCKED) };
  49 + }
  50 + //else
  51 + //{
  52 + // logger.Debug("inside else in UnblockUserController userData= " + user);
  53 + // return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(user.ToString()) };
  54 + //}
  55 + return response;
  56 + }
  57 +
  58 + // PUT api/unblockuser/5
  59 + public void Put(int id, [FromBody]string value)
  60 + {
  61 + }
  62 +
  63 + // DELETE api/unblockuser/5
  64 + public void Delete(int id)
  65 + {
  66 + }
  67 + }
  68 +}
0 69 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
... ... @@ -33,8 +33,8 @@ namespace AIAHTML5.API.Models
33 33 protected static DataSet GetSQLData(string commandText, bool isSp)
34 34 {
35 35 ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
36   - logger.Debug(" inside GetSQLData for command text = " + commandText);
37   - DataSet ds= null;
  36 + logger.Debug(" Inside GetSQLData for command text = " + commandText);
  37 + DataSet ds = null;
38 38 try
39 39 {
40 40 conn = new SqlConnection(dbConnectionString);
... ... @@ -54,7 +54,7 @@ namespace AIAHTML5.API.Models
54 54 }
55 55 catch (SqlException ex)
56 56 {
57   - logger.Fatal("Exception in GetSQLData for command text =" + commandText + ", Exception= " + ex.Message);
  57 + logger.Fatal("Exception in GetSQLData for command text =" + commandText + ", Exception= " + ex.Message + ", STACKTRACE= "+ ex.StackTrace);
58 58 }
59 59 return ds;
60 60 }
... ... @@ -92,7 +92,7 @@ namespace AIAHTML5.API.Models
92 92 DataSet ds = new DataSet();
93 93  
94 94 cmd.Connection = conn;
95   - cmd.CommandText = "GetUserDetailsByLoginIdAndPassword";
  95 + cmd.CommandText = "GetUserDetailsByLoginId";
96 96 cmd.CommandType = CommandType.StoredProcedure;
97 97  
98 98 param = new SqlParameter("@sLoginId", loginId);
... ... @@ -100,11 +100,6 @@ namespace AIAHTML5.API.Models
100 100 param.DbType = DbType.String;
101 101 cmd.Parameters.Add(param);
102 102  
103   - param = new SqlParameter("@sPassword", password);
104   - param.Direction = ParameterDirection.Input;
105   - param.DbType = DbType.String;
106   - cmd.Parameters.Add(param);
107   -
108 103 da.SelectCommand = cmd;
109 104 DataTable dt = new DataTable();
110 105 da.Fill(dt);
... ... @@ -167,14 +162,16 @@ namespace AIAHTML5.API.Models
167 162 objUser.ModifiedDate = date;
168 163 }
169 164 if (dc.ColumnName == "UserTypeId")
  165 + {
  166 + objUser.UserTypeId = Convert.ToInt32(dr[dc]);
170 167 objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr[dc]));
  168 + }
171 169 if (dc.ColumnName == "IsActive")
172 170 objUser.IsActive = Convert.ToBoolean(dr[dc]);
173 171  
174 172 }
175 173 }
176 174 }
177   -
178 175 else
179 176 {
180 177 objUser = null;
... ... @@ -182,18 +179,30 @@ namespace AIAHTML5.API.Models
182 179  
183 180 if (objUser != null)
184 181 {
  182 + Hashtable licenseEditionHash = objModel.GetUserLicenseIdEditionIdByUserId(objUser.Id);
  183 + foreach (DictionaryEntry de in licenseEditionHash)
  184 + {
  185 + if (de.Key.ToString() == AIAConstants.LICENSE_KEY_ID)
  186 + objUser.LicenseId = Convert.ToInt32(de.Value);
  187 + if (de.Key.ToString() == AIAConstants.EDITION_KEY_ID)
  188 + objUser.EditionId = Convert.ToInt32(de.Value);
  189 + }
185 190  
186   - int licenseId = objModel.GetUserLicenseIdByUserId(objUser.Id);
187   - if (licenseId != 0)
  191 + if (objUser.LicenseId != 0)
188 192 {
189   - objUser.License = objModel.GetLicenseDetailsByLicenseId(licenseId);
190   - objUser.LicenseSubscriptions = objModel.GetLicenseSubscriptionDetailsByLicenseId(licenseId);
  193 + objUser.License = objModel.GetLicenseDetailsByLicenseId(objUser.LicenseId);
  194 + objUser.LicenseSubscriptions = objModel.GetLicenseSubscriptionDetailsByLicenseId(objUser.LicenseId);
191 195 }
192 196 else
193 197 {
194 198 objUser.License = null;
195 199 }
196 200  
  201 + objUser.IncorrectLoginAttemptCount = objModel.GetIncorrectLoginAttempts(objUser.Id);
  202 + if (objUser.IncorrectLoginAttemptCount >= 5)
  203 + objUser.IsBlocked = true;
  204 +
  205 +
197 206 if (objUser.UserType == User.SUPER_ADMIN || objUser.UserType == User.GENERAL_ADMIN)
198 207 {
199 208 objUser.Modules = objModel.GetUserModules();
... ... @@ -208,18 +217,18 @@ namespace AIAHTML5.API.Models
208 217 if (subscriptionValidThrough != null && subscriptionValidThrough.Value.Date >= DateTime.Now.Date)
209 218 {
210 219 ArrayList allModulesList = objModel.GetUserModules();
211   - ArrayList licensedModulesList = objModel.GetModuleStatusByLicenseId(licenseId);
  220 + ArrayList licensedModulesList = objModel.GetModuleStatusByLicenseId(objUser.LicenseId);
212 221  
213 222 ArrayList userModuleList = objModel.GetUserModulesList(allModulesList, licensedModulesList);
214 223 objUser.Modules = userModuleList;
215 224  
216 225 if (!objUser.License.IsTermAccepted)
217   - {
  226 + {
218 227 ArrayList termsList = DBModel.GetTermsOfServiceText();
219   - foreach(Hashtable item in termsList)
  228 + foreach (Hashtable item in termsList)
220 229 {
221   - objUser.TermsOfServiceTitle = item["title"].ToString();
222   - objUser.TermsOfServiceText = item["content"].ToString();
  230 + objUser.TermsOfServiceTitle = item["title"].ToString();
  231 + objUser.TermsOfServiceText = item["content"].ToString();
223 232 }
224 233 }
225 234 }
... ... @@ -231,14 +240,102 @@ namespace AIAHTML5.API.Models
231 240 }
232 241 }
233 242 }
234   - }
235 243  
  244 + if (!string.Equals(objUser.Password, password))
  245 + {
  246 + objUser.IsCorrectPassword = false;
  247 + objUser.IncorrectLoginAttemptCount = objModel.GetIncorrectLoginAttempts(objUser.Id) + 1;
  248 +
  249 + objUser.LoginFailureCauseId = ErrorHelper.E_PASSWORD_NOT_MATCH;
  250 +
  251 + if (objUser.IncorrectLoginAttemptCount == 1)
  252 + {
  253 + objModel.InsertIncorrectLoginAttempts(objUser.Id);
  254 + }
  255 + else
  256 + {
  257 + if (!objUser.IsBlocked)
  258 + objModel.UpdateIncorrectLoginAttempts(objUser.Id);
  259 +
  260 + if (objUser.IncorrectLoginAttemptCount > 4)
  261 + {
  262 + objUser.IsBlocked = true;
  263 + objUser.LoginFailureCauseId = ErrorHelper.E_USER_ID_BLOCKED_24_HRS;
  264 + }
  265 + }
  266 + if (objUser.License != null && !string.IsNullOrEmpty(objUser.License.AccountNumber))
  267 + objModel.InsertUserLoginLog(objUser.License.AccountNumber, objUser.LoginFailureCauseId, null, objUser.EditionId.ToString(), null);
  268 + }
  269 + else
  270 + {
  271 + if (objUser.License != null)
  272 + {
  273 + if (objUser.License.IsActive && !objUser.IsSubscriptionExpired)
  274 + {
  275 + ArrayList blockedUsersList = objModel.GetBlockedUsers(objUser.UserTypeId, objUser.License.Id);
  276 + foreach (BlockedUser bUser in blockedUsersList)
  277 + {
  278 + DateTime LoginTime = (DateTime)bUser.LoginTime;
  279 + DateTime blockTime = LoginTime.AddDays(1);
  280 + var difference = DateTime.Compare(DateTime.Now, blockTime);
  281 + if (bUser.Id == objUser.Id)
  282 + {
  283 + if (difference >= 0)
  284 + {
  285 + objUser.IsBlocked = false;
  286 + }
  287 + else
  288 + {
  289 + objUser.IsBlocked = true;
  290 + }
  291 + }
  292 + }
  293 + if (!objUser.IsBlocked)
  294 + {
  295 + objUser.IsCorrectPassword = true;
  296 + objModel.InsertLoginDetails(objUser.Id);
  297 + objModel.DeleteIncorrectLoginAttempts(objUser.Id);
  298 + }
  299 + }
  300 + else
  301 + objUser.IsCorrectPassword = true;
  302 + }
  303 + else
  304 + {
  305 + ArrayList blockedAdminUsersList = objModel.GetBlockedAdminUsers(objUser.UserTypeId);
  306 + foreach (BlockedUser bUser in blockedAdminUsersList)
  307 + {
  308 + DateTime LoginTime = (DateTime)bUser.LoginTime;
  309 + DateTime blockTime = LoginTime.AddDays(1);
  310 + var difference = DateTime.Compare(DateTime.Now, blockTime);
  311 + if (bUser.Id == objUser.Id)
  312 + {
  313 + if (difference >= 0)
  314 + {
  315 + objUser.IsBlocked = false;
  316 + }
  317 + else
  318 + {
  319 + objUser.IsBlocked = true;
  320 + }
  321 + }
  322 + }
  323 + if (!objUser.IsBlocked)
  324 + {
  325 + objUser.IsCorrectPassword = true;
  326 + objModel.InsertLoginDetails(objUser.Id);
  327 + objModel.DeleteIncorrectLoginAttempts(objUser.Id);
  328 + }
  329 + }
  330 + }
  331 + }
236 332 return objUser;
237 333 }
238 334  
239   - protected int GetUserLicenseIdByUserId(int userId)
  335 + protected Hashtable GetUserLicenseIdEditionIdByUserId(int userId)
240 336 {
241   - int _licenseId = 0;
  337 + Hashtable hash = new Hashtable();
  338 +
242 339 conn = new SqlConnection(dbConnectionString);
243 340 cmd = new SqlCommand();
244 341 SqlDataAdapter adapter;
... ... @@ -246,7 +343,7 @@ namespace AIAHTML5.API.Models
246 343 DataSet ds = new DataSet();
247 344  
248 345 cmd.Connection = conn;
249   - cmd.CommandText = "GetLicenseIdByUserId";
  346 + cmd.CommandText = "GetLicenseIdEditionIdByUserId";
250 347 cmd.CommandType = CommandType.StoredProcedure;
251 348  
252 349 param = new SqlParameter("@iUserId", userId);
... ... @@ -257,8 +354,11 @@ namespace AIAHTML5.API.Models
257 354 adapter = new SqlDataAdapter(cmd);
258 355 adapter.Fill(ds);
259 356 if (ds.Tables[0].Rows.Count > 0)
260   - _licenseId = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
261   - return _licenseId;
  357 + {
  358 + hash.Add("LicenseId", ds.Tables[0].Rows[0][0]);
  359 + hash.Add("EditionId", ds.Tables[0].Rows[0][1]);
  360 + }
  361 + return hash;
262 362 }
263 363  
264 364 protected ArrayList GetModuleStatusByLicenseId(int licenseId)
... ... @@ -358,6 +458,9 @@ namespace AIAHTML5.API.Models
358 458  
359 459 public static User GetUserDetailsByEmailId(string emailId)
360 460 {
  461 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  462 + logger.Debug(" Inside GetUserDetailsByEmailId for emailId = " + emailId);
  463 +
361 464 User objUser = new User();
362 465 DBModel objModel = new DBModel();
363 466  
... ... @@ -446,7 +549,9 @@ namespace AIAHTML5.API.Models
446 549 }
447 550 }
448 551 catch (Exception ex)
449   - { }
  552 + {
  553 + logger.Fatal("Exception in GetUserDetailsByEmailId for emailId= " + emailId + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
  554 + }
450 555  
451 556 return objUser;
452 557 }
... ... @@ -470,6 +575,9 @@ namespace AIAHTML5.API.Models
470 575  
471 576 protected LicenseSubscriptionDetails GetLicenseSubscriptionDetailsByLicenseId(int licenseId)
472 577 {
  578 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  579 + logger.Debug(" Inside GetLicenseSubscriptionDetailsByLicenseId for LicenseId = " + licenseId);
  580 +
473 581 LicenseSubscriptionDetails lsd = new LicenseSubscriptionDetails();
474 582 try
475 583 {
... ... @@ -550,7 +658,7 @@ namespace AIAHTML5.API.Models
550 658 }
551 659 catch (Exception ex)
552 660 {
553   -
  661 + logger.Fatal("Exception in GetLicenseSubscriptionDetailsByLicenseId for LicenseId= " + licenseId + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
554 662 }
555 663  
556 664 return lsd;
... ... @@ -558,6 +666,9 @@ namespace AIAHTML5.API.Models
558 666  
559 667 protected License GetLicenseDetailsByLicenseId(int licenseId)
560 668 {
  669 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  670 + logger.Debug(" inside GetLicenseDetailsByLicenseId for LicenseId = " + licenseId);
  671 +
561 672 License lic = new License();
562 673 try
563 674 {
... ... @@ -643,7 +754,7 @@ namespace AIAHTML5.API.Models
643 754 }
644 755 catch (Exception ex)
645 756 {
646   -
  757 + logger.Fatal("Exception in GetLicenseDetailsByLicenseId for LicenseId= " + licenseId + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
647 758 }
648 759  
649 760 return lic;
... ... @@ -652,7 +763,7 @@ namespace AIAHTML5.API.Models
652 763 public static int UpdateLicenseTermStatus(string accountNumber)
653 764 {
654 765 ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
655   - logger.Debug(" inside UpdateTermAcceptedStatus for AccountNumber = " + accountNumber);
  766 + logger.Debug(" inside UpdateLicenseTermStatus for AccountNumber = " + accountNumber);
656 767 int result = 0;
657 768 try
658 769 {
... ... @@ -669,7 +780,7 @@ namespace AIAHTML5.API.Models
669 780 catch (SqlException ex)
670 781 {
671 782 conn.Close();
672   - logger.Fatal("Exception in UpdateLicenseTermStatus for AccountNumber =" + accountNumber + ", Exception= " + ex.Message);
  783 + logger.Fatal("Exception in UpdateLicenseTermStatus for AccountNumber =" + accountNumber + ", Exception= " + ex.Message + ", STACKTRACE=" + ex.StackTrace);
673 784 }
674 785 return result;
675 786 }
... ... @@ -692,5 +803,314 @@ namespace AIAHTML5.API.Models
692 803 }
693 804 return arrTermsOfService;
694 805 }
  806 +
  807 + protected int InsertLoginDetails(int userId)
  808 + {
  809 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  810 + logger.Debug(" inside InsertLoginDetails for UserId= " + userId);
  811 +
  812 + int result = 0;
  813 + try
  814 + {
  815 + conn = new SqlConnection(dbConnectionString);
  816 + cmd = new SqlCommand();
  817 + cmd.Connection = conn;
  818 + conn.Open();
  819 + cmd.CommandText = "InsertLoginDetail";
  820 + cmd.CommandType = CommandType.StoredProcedure;
  821 + cmd.Parameters.AddWithValue("@iUserId", userId);
  822 + result = cmd.ExecuteNonQuery();
  823 + conn.Close();
  824 + }
  825 + catch (SqlException ex)
  826 + {
  827 + conn.Close();
  828 + logger.Fatal("Exception in InsertLoginDetails for UserId= " + userId + ", Exception= " + ex.Message + ", STACKTRACE=" + ex.StackTrace);
  829 + }
  830 + return result;
  831 + }
  832 +
  833 + protected int InsertIncorrectLoginAttempts(int userId)
  834 + {
  835 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  836 + logger.Debug(" inside InsertIncorrectLoginAttempts for UserId= " + userId);
  837 +
  838 + int result = 0;
  839 + try
  840 + {
  841 + conn = new SqlConnection(dbConnectionString);
  842 + cmd = new SqlCommand();
  843 + cmd.Connection = conn;
  844 + conn.Open();
  845 + cmd.CommandText = "InsertIncorrectLoginAttempt";
  846 + cmd.CommandType = CommandType.StoredProcedure;
  847 + cmd.Parameters.AddWithValue("@iUserId", userId);
  848 + result = cmd.ExecuteNonQuery();
  849 + conn.Close();
  850 + }
  851 + catch (SqlException ex)
  852 + {
  853 + logger.Fatal("Exception in InsertIncorrectLoginAttempts for UserId= " + userId + ", Exception= " + ex.Message + ", STACKTRACE= "+ ex.StackTrace);
  854 + }
  855 + return result;
  856 + }
  857 +
  858 + protected int GetIncorrectLoginAttempts(int userId)
  859 + {
  860 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  861 + logger.Debug(" inside GetIncorrectLoginAttempts for UserId = " + userId);
  862 + int count = 0;
  863 + try
  864 + {
  865 + conn = new SqlConnection(dbConnectionString);
  866 + cmd = new SqlCommand();
  867 + cmd.Connection = conn;
  868 + cmd.CommandText = "GetIncorrectLoginAttempt";
  869 + cmd.CommandType = CommandType.StoredProcedure;
  870 + cmd.Parameters.AddWithValue("@iUserId", userId);
  871 + SqlDataAdapter da = new SqlDataAdapter();
  872 + da.SelectCommand = cmd;
  873 + DataSet ds = new DataSet();
  874 + da.Fill(ds);
  875 + DataTable dt = ds.Tables[0];
  876 +
  877 + foreach (DataRow dr in dt.Rows)
  878 + {
  879 + foreach (DataColumn dc in dt.Columns)
  880 + {
  881 + count = Convert.ToInt32(dr[dc]);
  882 + }
  883 + }
  884 + }
  885 + catch (SqlException ex)
  886 + {
  887 + logger.Fatal("Exception in GetIncorrectLoginAttempts for UserId = " + userId + " Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
  888 + }
  889 + return count;
  890 + }
  891 +
  892 + protected int UpdateIncorrectLoginAttempts(int userId)
  893 + {
  894 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  895 + logger.Debug(" inside UpdateIncorrectLoginAttempts for UserId= " + userId);
  896 +
  897 + int result = 0;
  898 + try
  899 + {
  900 + conn = new SqlConnection(dbConnectionString);
  901 + cmd = new SqlCommand();
  902 + cmd.Connection = conn;
  903 + conn.Open();
  904 + cmd.CommandText = "UpdateIncorrectLoginAttempts";
  905 + cmd.CommandType = CommandType.StoredProcedure;
  906 + cmd.Parameters.AddWithValue("@iUserId", userId);
  907 + result = cmd.ExecuteNonQuery();
  908 + conn.Close();
  909 + }
  910 + catch (SqlException ex)
  911 + {
  912 + conn.Close();
  913 + logger.Fatal("Exception in UpdateIncorrectLoginAttempts for UserId= " + userId + ", Exception= " + ex.Message + ", STACKTRACE=" + ex.StackTrace);
  914 + }
  915 + return result;
  916 + }
  917 +
  918 + protected int DeleteIncorrectLoginAttempts(int userId)
  919 + {
  920 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  921 + logger.Debug(" inside DeleteIncorrectLoginAttempts for UserId= " + userId);
  922 +
  923 + int result = 0;
  924 + try
  925 + {
  926 + conn = new SqlConnection(dbConnectionString);
  927 + cmd = new SqlCommand();
  928 + cmd.Connection = conn;
  929 + conn.Open();
  930 + cmd.CommandText = "DeleteIncorrectLoginAttempts";
  931 + cmd.CommandType = CommandType.StoredProcedure;
  932 + cmd.Parameters.AddWithValue("@iUserId", userId);
  933 + result = cmd.ExecuteNonQuery();
  934 + conn.Close();
  935 + }
  936 + catch (SqlException ex)
  937 + {
  938 + conn.Close();
  939 + logger.Fatal("Exception in DeleteIncorrectLoginAttempts for UserId= " + userId + ", Exception= " + ex.Message + ", STACKTRACE= "+ ex.StackTrace);
  940 + }
  941 + return result;
  942 + }
  943 +
  944 + protected ArrayList GetLoginFailureCauses()
  945 + {
  946 + ArrayList failureCauseList = new ArrayList();
  947 + Hashtable fcHash = null;
  948 +
  949 + string sp = "GetAllLoginFailureCauses";
  950 +
  951 + DataSet ds = DBModel.GetSQLData(sp, true);
  952 + DataTable dt = ds.Tables[0];
  953 +
  954 + foreach (DataRow drFailureCause in dt.Rows)
  955 + {
  956 + fcHash = new Hashtable();
  957 + fcHash.Add(AIAConstants.KEY_ID, drFailureCause["Id"]);
  958 + fcHash.Add(AIAConstants.KEY_DESCRIPTION, drFailureCause["Description"]);
  959 + failureCauseList.Add(fcHash);
  960 + }
  961 + return failureCauseList;
  962 + }
  963 +
  964 + protected int InsertUserLoginLog(string accountNumber, Int16 failureId, string referalUrl, string edition, string httpReferer)
  965 + {
  966 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  967 + logger.Debug(" inside InsertUserLoginLog for AccountNumber= " + accountNumber);
  968 +
  969 + int result = 0;
  970 + try
  971 + {
  972 + conn = new SqlConnection(dbConnectionString);
  973 + cmd = new SqlCommand();
  974 + cmd.Connection = conn;
  975 + conn.Open();
  976 + cmd.CommandText = "InsertLoginErrorLog";
  977 + cmd.CommandType = CommandType.StoredProcedure;
  978 + cmd.Parameters.AddWithValue("@nvAccountNumber", accountNumber);
  979 + cmd.Parameters.AddWithValue("@dtLogDate", DateTime.Now);
  980 + cmd.Parameters.AddWithValue("@tiFailureId", failureId);
  981 + cmd.Parameters.AddWithValue("@nvReferalUrl", referalUrl);
  982 + cmd.Parameters.AddWithValue("@nvEdition", edition);
  983 + cmd.Parameters.AddWithValue("@nvHttpReferer", httpReferer);
  984 + result = cmd.ExecuteNonQuery();
  985 + conn.Close();
  986 + }
  987 + catch (SqlException ex)
  988 + {
  989 + logger.Fatal("Exception in InsertUserLoginLog for AccountNumber= " + accountNumber + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
  990 + }
  991 + return result;
  992 + }
  993 +
  994 + protected ArrayList GetBlockedUsers(int userTypeId, int licenseId)
  995 + {
  996 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  997 + logger.Debug(" inside GetBlockedUsers for LicenseId= " + licenseId + " & UserTypeId= " + userTypeId);
  998 +
  999 + ArrayList blockedUsersList = new ArrayList();
  1000 + BlockedUser blockedUser = new BlockedUser();
  1001 + DataTable dt = null;
  1002 + try
  1003 + {
  1004 + conn = new SqlConnection(dbConnectionString);
  1005 + cmd = new SqlCommand();
  1006 + cmd.Connection = conn;
  1007 + cmd.CommandText = "GetBlockedUserByAccNoAndType";
  1008 + cmd.CommandType = CommandType.StoredProcedure;
  1009 + cmd.Parameters.AddWithValue("@iUserTypeId", userTypeId);
  1010 + cmd.Parameters.AddWithValue("@iLicenseId", licenseId);
  1011 + SqlDataAdapter da = new SqlDataAdapter();
  1012 + da.SelectCommand = cmd;
  1013 + dt = new DataTable();
  1014 + da.Fill(dt);
  1015 +
  1016 + if (dt.Rows.Count > 0)
  1017 + {
  1018 + foreach (DataRow dr in dt.Rows)
  1019 + {
  1020 + foreach (DataColumn dc in dt.Columns)
  1021 + {
  1022 + if (dc.ColumnName == "Id")
  1023 + blockedUser.Id = Convert.ToInt32(dr[dc]);
  1024 + if (dc.ColumnName == "FirstName")
  1025 + blockedUser.FirstName = dr[dc].ToString();
  1026 + if (dc.ColumnName == "LastName")
  1027 + blockedUser.LastName = dr[dc].ToString();
  1028 + if (dc.ColumnName == "EmailId")
  1029 + blockedUser.EmailId = dr[dc].ToString();
  1030 + if (dc.ColumnName == "LoginId")
  1031 + blockedUser.LoginId = dr[dc].ToString();
  1032 + if (dc.ColumnName == "Password")
  1033 + blockedUser.Password = dr[dc].ToString();
  1034 + if (dc.ColumnName == "AccountNumber")
  1035 + blockedUser.AccountNumber = dr[dc].ToString();
  1036 + if (dc.ColumnName == "LoginTime")
  1037 + blockedUser.LoginTime = Convert.ToDateTime(dr[dc]);
  1038 + }
  1039 + blockedUsersList.Add(blockedUser);
  1040 + }
  1041 + }
  1042 + }
  1043 + catch (SqlException ex)
  1044 + {
  1045 + logger.Fatal("Exception in GetBlockedUsers for LicenseId= " + licenseId + " & UserTypeId= " + userTypeId + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
  1046 + }
  1047 + return blockedUsersList;
  1048 + }
  1049 +
  1050 + protected ArrayList GetBlockedAdminUsers(int userTypeId)
  1051 + {
  1052 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  1053 + logger.Debug(" inside GetBlockedAdminUsers for UserTypeId= " + userTypeId);
  1054 +
  1055 + ArrayList blockedUsersList = new ArrayList();
  1056 + BlockedUser blockedUser = null;
  1057 + DataTable dt = null;
  1058 + try
  1059 + {
  1060 + conn = new SqlConnection(dbConnectionString);
  1061 + cmd = new SqlCommand();
  1062 + cmd.Connection = conn;
  1063 + cmd.CommandText = "GetBlockedUserByUserType";
  1064 + cmd.CommandType = CommandType.StoredProcedure;
  1065 + cmd.Parameters.AddWithValue("@iUserTypeId", userTypeId);
  1066 + SqlDataAdapter da = new SqlDataAdapter();
  1067 + da.SelectCommand = cmd;
  1068 + dt = new DataTable();
  1069 + da.Fill(dt);
  1070 +
  1071 + if (dt.Rows.Count > 0)
  1072 + {
  1073 + foreach (DataRow dr in dt.Rows)
  1074 + {
  1075 + blockedUser = new BlockedUser();
  1076 + foreach (DataColumn dc in dt.Columns)
  1077 + {
  1078 + if (dc.ColumnName == "Id")
  1079 + blockedUser.Id = Convert.ToInt32(dr[dc]);
  1080 + if (dc.ColumnName == "FirstName")
  1081 + blockedUser.FirstName = dr[dc].ToString();
  1082 + if (dc.ColumnName == "LastName")
  1083 + blockedUser.LastName = dr[dc].ToString();
  1084 + if (dc.ColumnName == "EmailId")
  1085 + blockedUser.EmailId = dr[dc].ToString();
  1086 + if (dc.ColumnName == "LoginId")
  1087 + blockedUser.LoginId = dr[dc].ToString();
  1088 + if (dc.ColumnName == "Password")
  1089 + blockedUser.Password = dr[dc].ToString();
  1090 + if (dc.ColumnName == "AccountNumber")
  1091 + blockedUser.AccountNumber = dr[dc].ToString();
  1092 + if (dc.ColumnName == "LoginTime")
  1093 + blockedUser.LoginTime = Convert.ToDateTime(dr[dc]);
  1094 + }
  1095 + blockedUsersList.Add(blockedUser);
  1096 + }
  1097 + }
  1098 + }
  1099 + catch (SqlException ex)
  1100 + {
  1101 + logger.Fatal("Exception in GetBlockedAdminUsers for UserTypeId= " + userTypeId + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
  1102 + }
  1103 + return blockedUsersList;
  1104 + }
  1105 +
  1106 + public static int UnblockUser(int userId)
  1107 + {
  1108 + int result = 0;
  1109 + DBModel objModel = new DBModel();
  1110 +
  1111 + result = objModel.DeleteIncorrectLoginAttempts(userId);
  1112 +
  1113 + return result;
  1114 + }
695 1115 }
696 1116 }
697 1117 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.API/Models/User.cs
... ... @@ -22,7 +22,14 @@ namespace AIAHTML5.API.Models
22 22 public int? ModifierId { get; set; }
23 23 public DateTime? ModifiedDate { get; set; }
24 24 public string UserType { get; set; }
  25 + public int UserTypeId { get; set; }
25 26 public bool IsActive { get; set; }
  27 + public bool IsCorrectPassword { get; set; }
  28 + public int IncorrectLoginAttemptCount { get; set; }
  29 + public bool IsBlocked { get; set; }
  30 + public int LicenseId { get; set; }
  31 + public int EditionId { get; set; }
  32 + public Int16 LoginFailureCauseId { get; set; }
26 33  
27 34 public ArrayList Modules { get; set; }
28 35  
... ... @@ -89,4 +96,16 @@ namespace AIAHTML5.API.Models
89 96 public double AmountPending { get; set; }
90 97 public int NoOfImages { get; set; }
91 98 }
  99 +
  100 + public class BlockedUser
  101 + {
  102 + public int Id { get; set; }
  103 + public string FirstName { get; set; }
  104 + public string LastName { get; set; }
  105 + public string LoginId { get; set; }
  106 + public string Password { get; set; }
  107 + public string EmailId { get; set; }
  108 + public string AccountNumber { get; set; }
  109 + public DateTime LoginTime { get; set; }
  110 + }
92 111 }
93 112 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs
... ... @@ -18,7 +18,7 @@ namespace AIAHTML5.API.Models
18 18 {
19 19 public class UserUtility
20 20 {
21   - public static bool SendEmail(dynamic UserDetails, bool havePassword)
  21 + public static bool SendEmail(dynamic UserDetails, bool havePassword, bool unbLockUser = false)
22 22 {
23 23 ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
24 24 logger.Debug("inside SendEmail in for havePassword =" + havePassword);
... ... @@ -71,8 +71,16 @@ namespace AIAHTML5.API.Models
71 71  
72 72 if (havePassword)
73 73 {
74   - templatePath = "~/Templates/forgot-Password.html";
75   - resetPasswordLink = site_url + "?em:" + HttpUtility.UrlEncode(userMail);
  74 + if (unbLockUser)
  75 + {
  76 + templatePath = "~/Templates/unblock-User.html";
  77 + resetPasswordLink = site_url + "?unb:" + HttpUtility.UrlEncode(userMail);
  78 + }
  79 + else
  80 + {
  81 + templatePath = "~/Templates/forgot-Password.html";
  82 + resetPasswordLink = site_url + "?em:" + HttpUtility.UrlEncode(userMail);
  83 + }
76 84 }
77 85 else
78 86 templatePath = "~/Templates/forgot-UserId.html";
... ... @@ -105,8 +113,12 @@ namespace AIAHTML5.API.Models
105 113 if (!havePassword)
106 114 mailSubject = "UserID recovery mail for: ";
107 115 else
108   - mailSubject = "Password recovery mail for: ";
109   -
  116 + {
  117 + if (unbLockUser)
  118 + mailSubject = "Unblock user request mail for: ";
  119 + else
  120 + mailSubject = "Password recovery mail for: ";
  121 + }
110 122  
111 123 emailUtility.sHostName = Convert.ToString(ConfigurationManager.AppSettings["HostAddress"]);
112 124 emailUtility.sFromAddress = Convert.ToString(ConfigurationManager.AppSettings["SenderEmailAddress"]);
... ...
400-SOURCECODE/AIAHTML5.API/Models/Users.cs
... ... @@ -60,11 +60,11 @@ namespace AIAHTML5.API.Models
60 60 catch (Exception e)
61 61 {
62 62  
63   - logger.Fatal("Exception in AuthenticateUser for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString() + "Exception= " + e.Message);
  63 + logger.Fatal("Exception in AuthenticateUser for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
64 64  
65 65 string errorMessage = AIAConstants.ERROR_IN_FECTHING_DETAILS;
66 66 string error = "Message: " + e.Message + ", STACKTRACE: " + e.StackTrace;
67   - userDetails = error;
  67 + userDetails = errorMessage;
68 68 }
69 69 return userDetails;
70 70 }
... ... @@ -122,7 +122,7 @@ namespace AIAHTML5.API.Models
122 122 }
123 123 catch (Exception ex)
124 124 {
125   - logger.Fatal("Exception in Gettting UserDetailsByEmailId for EmailId =" + userInfo["emailId"].ToString() + " Exception= " + ex.Message);
  125 + logger.Fatal("Exception in Gettting UserDetailsByEmailId for EmailId =" + userInfo["emailId"].ToString() + " Exception= " + ex.Message + ", STACKTRACE: " + ex.StackTrace);
126 126  
127 127 string errorMessage = AIAConstants.ERROR_IN_FECTHING_DETAILS;
128 128 return errorMessage;
... ... @@ -146,14 +146,14 @@ namespace AIAHTML5.API.Models
146 146  
147 147 int result = DBModel.UpdateUserPassword(userInfo);
148 148  
149   - if (result != null)
  149 + if (result > 0)
150 150 return result;
151 151 else
152 152 return AIAConstants.USER_NOT_FOUND;
153 153 }
154 154 catch (Exception e)
155 155 {
156   - logger.Fatal("Exception= " + e.Message);
  156 + logger.Fatal("Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
157 157 return AIAConstants.ERROR_IN_FECTHING_DETAILS;
158 158 }
159 159 }
... ...
400-SOURCECODE/AIAHTML5.API/Templates/unblock-User.html 0 → 100644
  1 +<style type='text/css'>
  2 + strong {
  3 + font-size: 18px;
  4 + color: #ffff00;
  5 + }
  6 +</style>
  7 +<table width='500' border='0' align='center' cellpadding='0' cellspacing='0'>
  8 + <tbody>
  9 + <tr>
  10 + <td align='center' valign='middle' bgcolor='#393939' style='padding:30px 0 20px 0;'>
  11 + <a href='#'><img src='{logoPath}' alt='AIA' title='AIA' /></a>
  12 + </td>
  13 + </tr>
  14 + <tr>
  15 + <td align='center' valign='top' bgcolor='#808d43' style='padding:20px;'>
  16 + <table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>
  17 + <tbody>
  18 + <tr>
  19 + <td colspan='2' style=' font-size:32px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>Unblock Account</td>
  20 + </tr>
  21 + <tr>
  22 + <td colspan='2'>&nbsp;</td>
  23 + </tr>
  24 + <tr>
  25 + <td colspan='2' style='font-size:20px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>Hi,</td>
  26 + </tr>
  27 + <tr>
  28 + <td colspan='2'>&nbsp;</td>
  29 + </tr>
  30 + <tr>
  31 + <td colspan='2' style=' font-size:16px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>You have requested to unblock your account for emailId: {emailId}</td>
  32 + </tr>
  33 + <tr>
  34 + <td colspan='2'>&nbsp;</td>
  35 + </tr>
  36 + <tr>
  37 + <td colspan='2' style=' font-size:16px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>Click the Unblock button below to unblock your A.D.A.M. Interactive Anatomy™ account</td>
  38 + </tr>
  39 + <tr>
  40 + <td colspan='2'>&nbsp;</td>
  41 + </tr>
  42 + <tr>
  43 + <td width="45%" bgcolor="#0072a7" style="padding:15px 20px; cursor: pointer;" onclick="document.location.href = '{resetPasswordLink}'">
  44 + <a href="{resetPasswordLink}" style="color:#ffffff; font-size:16px; text-transform:uppercase; text-align:center; text-decoration:none; font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; display: block;">Unblock</a>
  45 + </td>
  46 + <td width="55%" style="padding:10px 20px;">&nbsp;</td>
  47 + </tr>
  48 + <tr>
  49 + <td colspan='2'>&nbsp;</td>
  50 + </tr>
  51 + <tr>
  52 + <td colspan='2'>&nbsp;</td>
  53 + </tr>
  54 + <tr>
  55 + <td colspan='2'>&nbsp;</td>
  56 + </tr>
  57 + <tr>
  58 + <td colspan='2'>&nbsp;</td>
  59 + </tr>
  60 + </tbody>
  61 + </table>
  62 + </td>
  63 + </tr>
  64 + <tr>
  65 + <td bgcolor='#f9f2e7' style='padding:20px;'>
  66 + <table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>
  67 + <tbody>
  68 + <tr>
  69 + <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>A.D.A.M. – the company that pioneered online health content – is dedicated to creating and offering the most effective and innovative educational solutions possible for teaching medical science and improving health literacy.</td>
  70 + </tr>
  71 + <tr>
  72 + <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>&nbsp;</td>
  73 + </tr>
  74 + <tr>
  75 + <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>Give us a <b>call toll-free at 1-888-278-9614</b> or <em>send us an email</em> if you have any questions or if you need help. It will be our pleasure to help you.</td>
  76 + </tr>
  77 + <tr><td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>&nbsp;</td></tr>
  78 + <tr><td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>&nbsp;</td></tr>
  79 + <tr>
  80 + <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'><em>&copy; 2017 Ebix, Inc. All Rights Reserved. </em></td>
  81 + </tr>
  82 + </tbody>
  83 + </table>
  84 + </td>
  85 + </tr>
  86 + </tbody>
  87 +</table>
0 88 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -83,7 +83,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
83 83 havePassword: null,
84 84 newPassword: null,
85 85 confirmPassword: null,
86   - userMessage: null
  86 + userMessage: null,
  87 + unblockUser: null
87 88 };
88 89 $rootScope.userData;
89 90 $rootScope.userModules;
... ... @@ -113,6 +114,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
113 114 //$rootScope.isVisibleLogin = false;
114 115 //$rootScope.isVisibleResetPass = true;
115 116 VerifyUrlForQuerystring();
  117 + if ($location.url().indexOf('?unb:') != -1)
  118 + $rootScope.UnblockUser();
116 119 getUserDetails();
117 120 }
118 121  
... ... @@ -140,7 +143,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
140 143 if (result == LoginConstants.USER_NOT_FOUND) {
141 144 $rootScope.isVisibleLogin = true;
142 145 // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT);
143   - $rootScope.errorMessage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT;
  146 + $rootScope.errorMessage = LoginMessageConstants.INVALID_USER;
144 147 $("#messageModal").modal('show');
145 148 }
146 149 else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) {
... ... @@ -160,6 +163,18 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
160 163 $rootScope.errorMessage = LoginMessageConstants.INVALID_USER;
161 164 $("#messageModal").modal('show');
162 165 }
  166 + else if (!result.IsCorrectPassword) {
  167 + if (result.IncorrectLoginAttemptCount < 5) {
  168 + $rootScope.isVisibleLogin = true;
  169 + $rootScope.errorMessage = LoginMessageConstants.INVALID_PASSWORD;
  170 + $("#messageModal").modal('show');
  171 + }
  172 + else {
  173 + $rootScope.isVisibleLogin = true;
  174 + $rootScope.errorMessage = LoginMessageConstants.USER_BLOCKED;
  175 + $("#messageModal").modal('show');
  176 + }
  177 + }
163 178 else {
164 179 if ((!result.IsSubscriptionExpired) && (result.UserType == UserTypeConstants.SUPER_ADMIN) || result.UserType == UserTypeConstants.GENERAL_ADMIN && result.IsActive) {
165 180 $rootScope.userData = result;
... ... @@ -328,10 +343,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
328 343 }
329 344  
330 345 $rootScope.SendMailToUser = function (userInfo, isMailForPassword) {
  346 + var selectedOption = $("input[name='inlineRadioOptions']:checked").val();
331 347 if ((userInfo.emailId != null) && (userInfo.emailId != '')) {
332 348 if (validateEmail(userInfo.emailId)) {
333   - if (isMailForPassword == true)
  349 + if (isMailForPassword == true && selectedOption == LoginMessageConstants.UNBLOCK_SELECTED) {
  350 + userInfo.unblockUser = true;
334 351 userInfo.havePassword = true;
  352 + }
  353 + else if (isMailForPassword == true && selectedOption == LoginMessageConstants.FORGOT_PASSWORD_SELECTED) {
  354 + userInfo.unblockUser = false;
  355 + userInfo.havePassword = true;
  356 + }
335 357 else
336 358 userInfo.havePassword = false;
337 359  
... ... @@ -363,8 +385,12 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
363 385 $('.forgot-sm1').fadeOut();
364 386 $('.forgot-sm1').modal('hide');
365 387 }
366   - if (isMailForPassword)
367   - message = LoginMessageConstants.RESET_PASSWORD;
  388 + if (isMailForPassword) {
  389 + if (userInfo.unblockUser)
  390 + message = LoginMessageConstants.USER_UNBLOCK_LINK_IN_EMAIL;
  391 + else
  392 + message = LoginMessageConstants.RESET_PASSWORD;
  393 + }
368 394 else
369 395 message = LoginMessageConstants.USERID_SENT_IN_EMAIL
370 396 //alert(message);
... ... @@ -463,6 +489,42 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
463 489  
464 490 }
465 491  
  492 + $rootScope.UnblockUser = function () {
  493 + var userEmailId = '';
  494 + var url = $location.url();
  495 + if (url.indexOf('?unb:') != -1) {
  496 + var split = url.split('?unb:');
  497 + userEmailId = split[1];
  498 + }
  499 +
  500 + //document.location = '/';
  501 +
  502 + AuthenticationService.UnblockUser(userEmailId)
  503 + .then(
  504 + function (result) {
  505 + if (result == LoginMessageConstants.USER_UNBLOCK_SUCCESS) {
  506 + $rootScope.errorMessage = LoginMessageConstants.USER_UNBLOCK_SUCCESS_MESSAGE;
  507 + $("#messageModal").modal('show');
  508 + //$('#messageModal.btn-primary').click(function () {
  509 + // document.location = '/';
  510 + //});
  511 + }
  512 + else {
  513 + $rootScope.errorMessage = LoginMessageConstants.USER_ALREADY_UNBLOCKED;
  514 + $("#messageModal").modal('show');
  515 + //$('#messageModal.btn-primary').click(function () {
  516 + // document.location = '/';
  517 + //});
  518 + }
  519 + },
  520 + function (error) {
  521 + console.log(' Error in authentication = ' + error.statusText);
  522 + $rootScope.errorMessage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS;
  523 + $("#messageModal").modal('show');
  524 + }
  525 + );
  526 + }
  527 +
466 528 $rootScope.lexiconLanguageArray = [];
467 529 $rootScope.lexiconLanguageArray.push({ id: "1", language: "English" });
468 530 $(document).ready(function () {
... ...
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
... ... @@ -14,11 +14,11 @@ AIA.constant(&#39;pages&#39;, [
14 14 pageController: 'HomeController'
15 15 },
16 16 { // id:1,
17   - name: 'Dissectible Anatomy Views List',
18   - pageSlug: 'da-view-list',
19   - pageUrl: 'app/views/da/da-body-view-list.html',
20   - pageController: 'DAController'
21   - },
  17 + name: 'Dissectible Anatomy Views List',
  18 + pageSlug: 'da-view-list',
  19 + pageUrl: 'app/views/da/da-body-view-list.html',
  20 + pageController: 'DAController'
  21 + },
22 22 { //id:2,
23 23 name: 'Dissectible Anatomy Body View',
24 24 pageSlug: 'da-body-view',
... ... @@ -40,11 +40,11 @@ AIA.constant(&#39;pages&#39;, [
40 40  
41 41 },
42 42 {
43   - // id:4,
44   - name: 'Clinical Animations',
45   - pageSlug: 'clinical-animations',
46   - pageUrl: 'app/views/ca/ca-view.html',
47   - pageController: 'CAController'
  43 + // id:4,
  44 + name: 'Clinical Animations',
  45 + pageSlug: 'clinical-animations',
  46 + pageUrl: 'app/views/ca/ca-view.html',
  47 + pageController: 'CAController'
48 48  
49 49 },
50 50 { // id:5,
... ... @@ -139,7 +139,7 @@ AIA.constant(&#39;pages&#39;, [
139 139 pageController: 'LinkController'
140 140  
141 141 },
142   - {
  142 + {
143 143 name: 'A.D.A.M OnDemand',
144 144 pageSlug: 'Link/aod',
145 145 pageUrl: 'app/views/Link/Link-view.html',
... ... @@ -239,8 +239,8 @@ AIA.constant(&#39;Modules&#39;, [
239 239 Name: 'Lab Exercises',
240 240 },
241 241 {
242   - Id: 9,
243   - Name: 'ADAM Images',
  242 + Id: 9,
  243 + Name: 'ADAM Images',
244 244 },
245 245 {
246 246 Id: 10,
... ... @@ -249,32 +249,32 @@ AIA.constant(&#39;Modules&#39;, [
249 249 {
250 250 Id: 11,
251 251 Name: 'Encyclopedia',
252   -
  252 +
253 253 },
254 254 {
255 255 Id: 12,
256 256 Name: 'IP 10',
257 257 },
258   -
  258 +
259 259 {
260   - Id: 13,
261   - Name: 'In-Depth Reports',
  260 + Id: 13,
  261 + Name: 'In-Depth Reports',
262 262 },
263 263 {
264   - Id: 14,
265   - Name: 'Complementary and Alternative Medicine',
  264 + Id: 14,
  265 + Name: 'Complementary and Alternative Medicine',
266 266 },
267 267 {
268   - Id: 15,
269   - Name: 'Body Guide',
  268 + Id: 15,
  269 + Name: 'Body Guide',
270 270 },
271 271 {
272   - Id: 16,
273   - Name: 'Health Navigator',
  272 + Id: 16,
  273 + Name: 'Health Navigator',
274 274 },
275 275 {
276   - Id: 17,
277   - Name: 'The Wellness Tools',
  276 + Id: 17,
  277 + Name: 'The Wellness Tools',
278 278 },
279 279  
280 280 ]);
... ... @@ -291,7 +291,7 @@ AIA.constant(&#39;BodyRegions&#39;, [&#39;Abdomen&#39;, &#39;Body Wall and Back&#39;, &#39;Head and Neck&#39;, &#39;
291 291  
292 292 AIA.constant('BodySystems', ['Cardiovascular', 'Digestive', 'Endocrine', 'Immune', 'Integumentary', 'Lymphatic', 'Muscular', 'Nervous', 'Reproductive', 'Respiratory', 'Skeletal', 'Urinary']);
293 293  
294   -AIA.constant('ViewOrientations', ['Anterior', 'Posterior', 'Lateral','Medial', 'Superior', 'Inferior', 'Non-standard']);
  294 +AIA.constant('ViewOrientations', ['Anterior', 'Posterior', 'Lateral', 'Medial', 'Superior', 'Inferior', 'Non-standard']);
295 295  
296 296  
297 297 AIA.constant('MedicalSpecialties', ['Allergy & Immunology', 'Anesthesiology', 'Cardiology', 'Chiropractic', 'Dentistry', 'Dermatology', 'Embryology', 'Emergency Medicine', 'Endocrinology', 'First Aid', 'Gastroenterology', 'General Surgery', 'Geriatrics', 'Hematology', 'Infectious Diseases', 'Microbiology', 'Nuclear Medicine', 'Nephrology', 'Neurology', 'Nutrition', 'Obstetrics and Gynecology (OB/GYN)', 'Oncology (Cancer)', 'Opthalmology', 'Optometry', 'Orthopedics', 'Osteopathy', 'Otolaryngology (ENT)', 'Pathology', 'Pediatrics', 'Physiology', 'Plastic Surgery', 'Podiatry', 'Pulmonary Medicine', 'Radiology', 'Respiratory Therapy', 'Rheumatology', 'Sports Medicine', 'Urology', 'Vascular Medicine', 'Thoracic Surgery']);
... ... @@ -305,7 +305,7 @@ AIA.constant(&quot;LoginConstants&quot;, {
305 305 "USER_NOT_FOUND": "User not found.",
306 306 "ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.",
307 307 "MAIL_NOT_SENT": "Mail not sent."
308   -
  308 +
309 309 })
310 310  
311 311 AIA.constant("LoginMessageConstants", {
... ... @@ -326,7 +326,16 @@ AIA.constant(&quot;LoginMessageConstants&quot;, {
326 326 "SUBSCRIPTION_EXPIRATION_MESSAGE": "Your license has been expired since ",
327 327 "LICENSE_INACTIVE_MESSAGE": "Your license is inactive.",
328 328 "INVALID_USER": "Invalid UserID",
329   - "USER_INACTIVE_MESSAGE": "User ID is inactive."
  329 + "USER_INACTIVE_MESSAGE": "User ID is inactive.",
  330 + "INVALID_PASSWORD": "Invalid Password. UserID and password will be disabled if your password is entered incorrectly for five consecutive attempts. If you have forgotten your password, please click on the forgot password link.",
  331 + "USER_BLOCKED": 'Your User ID has been disabled for 24 hours. To unblock please click on "Reset Password" link and select proper option.',
  332 + "UNBLOCK_SELECTED": "unblock",
  333 + "FORGOT_PASSWORD_SELECTED": "forgotpwd",
  334 + "USER_UNBLOCK_LINK_IN_EMAIL": "Please check you email and unblock your account.",
  335 + "USER_UNBLOCK_SUCCESS": "User unblocked",
  336 + "USER_UNBLOCK_SUCCESS_MESSAGE": "Your account has been unblocked sucessfully.",
  337 + "USER_UNBLOCK_FAILED": "Unblock operation failed",
  338 + "USER_ALREADY_UNBLOCKED": "User already unblocked."
330 339 //"ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.",
331 340 //"MAIL_NOT_SENT": "Mail not sent."
332 341  
... ... @@ -335,8 +344,7 @@ AIA.constant(&quot;AdminConstants&quot;, {
335 344 "ERROR_IN_SENDING_MAIL": "Some internal error occured.",
336 345 "MAIL_SENT": "Mail sent.",
337 346 "MAIL_NOT_SENT": "Mail not sent.",
338   - "MAIL_SENT_SUCCESS_MESSAGE": "We have received your request. We will get back to you soon.",
339   -
  347 + "MAIL_SENT_SUCCESS_MESSAGE": "We have received your request. We will get back to you soon."
340 348 })
341 349 AIA.constant("UserTypeConstants", {
342 350 "SUPER_ADMIN": "Super Admin",
... ... @@ -351,9 +359,9 @@ AIA.constant(&quot;UserTypeConstants&quot;, {
351 359 })
352 360  
353 361 AIA.constant("AIAConstants", {
354   -
355   - "NO_BODY_SYSTEM_AVAILABLE" : "No body system available in this layer.",
356   -
  362 +
  363 + "NO_BODY_SYSTEM_AVAILABLE": "No body system available in this layer.",
  364 +
357 365 })
358 366  
359 367 AIA.constant("UserModules", [
... ... @@ -428,7 +436,7 @@ AIA.constant(&quot;UserModules&quot;, [
428 436 ]);
429 437 AIA.constant("AIAConstants", {
430 438  
431   - "NO_BODY_SYSTEM_AVAILABLE" : "No body system available in this layer.",
  439 + "NO_BODY_SYSTEM_AVAILABLE": "No body system available in this layer.",
432 440 })
433 441 AIA.config(function ($routeProvider, pages, $locationProvider) {
434 442  
... ...
400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js
... ... @@ -70,6 +70,24 @@
70 70 deferred.reject(status);
71 71 });
72 72 return deferred.promise;
  73 + },
  74 +
  75 + UnblockUser: function (userEmailId) {
  76 + var deferred = $q.defer();
  77 +
  78 + $http.post('/API/api/UnblockUser', JSON.stringify(userEmailId), {
  79 + headers: {
  80 + 'Content-Type': 'application/json'
  81 + }
  82 + })
  83 + .success(function (data, status, headers, config) {
  84 + console.log('success')
  85 + deferred.resolve(data);
  86 + }).error(function (data, status, headers, config) {
  87 + console.log('error')
  88 + deferred.reject(status);
  89 + });
  90 + return deferred.promise;
73 91 }
74 92  
75 93 }
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -159,7 +159,6 @@
159 159 #refreshBtn {
160 160 color: #ffffff;
161 161 }
162   -
163 162 </style>
164 163  
165 164  
... ... @@ -231,7 +230,7 @@
231 230 </div>
232 231 <!-- Forgot User ID (Small modal) -->
233 232 <div class="modal fade" id="forgotUserModal" role="dialog" tabindex="-1" aria-labelledby="exampleModalLabel" data-target=".forgot-sm">
234   - <div class="modal-dialog modal-sm" role="document">
  233 + <div class="modal-dialog" role="document">
235 234 <div class="modal-content">
236 235 <div class="modal-header">
237 236 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
... ... @@ -247,7 +246,7 @@
247 246 </div>
248 247 </form>
249 248 </div>
250   - <div class="modal-footer">
  249 + <div class="modal-footer" style="padding-bottom:10px;">
251 250 <button type="button" class="btn btn-primary btn-block" ng-click="SendMailToUser(userInfo, false)">Send Mail</button>
252 251 </div>
253 252 <!--<div style="color: maroon; font-weight: bold; " ng-if="message">{{message}}</div>-->
... ... @@ -256,23 +255,35 @@
256 255 </div>
257 256 <!-- Forgot Password (Small modal) -->
258 257 <div class="modal fade" id="forgotPwdModal" role="dialog" tabindex="-1" aria-labelledby="exampleModalLabel" data-target=".forgot-sm1">
259   - <div class="modal-dialog modal-sm" role="document">
  258 + <div class="modal-dialog" role="document">
260 259 <div class="modal-content">
261 260 <div class="modal-header">
262 261 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
263   - <h5 class="modal-title" id="exampleModalLabel">Enter your email id to recover Password</h5>
  262 + <h5 class="modal-title" id="exampleModalLabel">Enter your email id to unblock/ recover Password</h5>
264 263 </div>
265   - <div class="modal-body">
266   - <form id="forgetPwdForm">
  264 + <div class="modal-body" style="padding: 15px;">
  265 + <form id="forgetPwdForm" class="ng-pristine ng-valid ng-valid-email">
267 266 <div class="form-group">
268   - <div class="input-group">
  267 + <div class="">
  268 + <label class="radio-inline">
  269 + <input name="inlineRadioOptions" id="inlineRadio1" value="unblock" type="radio"> Unblock
  270 + </label>
  271 + <label class="radio-inline">
  272 + <input name="inlineRadioOptions" id="inlineRadio2" value="forgotpwd" type="radio"> Forgot Password
  273 + </label>
  274 + </div>
  275 + </div>
  276 +
  277 +
  278 + <div class="form-group">
  279 + <div class="input-group" style="margin-top: 8px;">
269 280 <span class="input-group-addon"><i class="fa fa-envelope"></i></span>
270   - <input id="btnEmail2" class="form-control" placeholder="Email" type="email" ng-model="userInfo.emailId">
  281 + <input id="btnEmail2" class="form-control ng-pristine ng-untouched ng-valid ng-valid-email" placeholder="Email" ng-model="userInfo.emailId" type="email">
271 282 </div>
272 283 </div>
273 284 </form>
274 285 </div>
275   - <div class="modal-footer">
  286 + <div class="modal-footer modal-footer-forgot-password" style="padding-bottom:10px;">
276 287 <button type="button" class="btn btn-primary btn-block" ng-click="SendMailToUser(userInfo, true)">Send Mail</button>
277 288 </div>
278 289 <!--<div style="color: maroon; font-weight: bold; " ng-if="message">{{message}}</div>-->
... ... @@ -496,8 +507,8 @@
496 507 <div class="form-group">
497 508 <label for="SystemFont" class="font13">Primary Lexicon</label>
498 509 <input type="text" id="primarylaxican" class="form-control" value="English" name="1" disabled>
499   - <button class="btn btn-sm btn-success btn-block marginTop5" id="laxicanlanguageChagne" disabled>Change</button>
500   -</div>
  510 + <button class="btn btn-sm btn-success btn-block marginTop5" id="laxicanlanguageChagne" disabled>Change</button>
  511 + </div>
501 512  
502 513 <div class="form-group">
503 514 <label for="SystemFont" class="font13">Secondary Lexicons</label>
... ... @@ -513,8 +524,7 @@
513 524 <div class="col-sm-6">
514 525 <div class="form-group">
515 526 <label for="SystemFont" class="font13">Available Lexicon</label>
516   - <select class="form-control" size="8" id="lexiconLangDropdown">
517   - </select>
  527 + <select class="form-control" size="8" id="lexiconLangDropdown"></select>
518 528 </div>
519 529 <p class="font11"><strong>Note :</strong> Some languages require special system fonts to display correctly</p>
520 530 </div>
... ... @@ -586,8 +596,8 @@
586 596 </div>
587 597 <div class="modal-footer">
588 598 <button type="button" class="btn btn-primary" ng-click="UpdateAndCloseSetting(formsetting)">OK</button>
589   -
590   - <!--<button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>-->
  599 +
  600 + <!--<button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>-->
591 601 <button type="button" class="btn btn-primary" ng-click="CloseSetting()">Cancel</button>
592 602 <button type="button" class="btn btn-primary" ng-click="UpdateSetting(formsetting)">Apply</button>
593 603 </div>
... ... @@ -597,7 +607,7 @@
597 607 </div>
598 608 <div id="setting-spinner" style="display:none;position: fixed; top: 50%; left: 50%; margin-left: -50px; z-index: 1234; overflow: auto; width: 100px;">
599 609 <img id="img-spinner" src="content/images/common/loading.gif" alt="Loading">
600   - </div>
  610 + </div>
601 611 <!--Annotation Modal-->
602 612 <div class="annotationTollbar" style="width: 300px;position: fixed; top: 80px; right: 20px; display: none; z-index: 1200000;">
603 613 <div class="annotationbar">
... ... @@ -852,7 +862,7 @@
852 862 <label class="col-sm-4 control-label" for="System">System</label>
853 863 <div class="col-sm-8">
854 864 <select id="bodySystems" class="form-control" onchange="if (typeof (this.selectedIndex) != 'undefined') refreshTermListOnSystem(this.options[this.selectedIndex].id)"></select>
855   - <select id="AABodySystems" class="form-control" onchange="if (typeof (this.selectedIndex) != 'undefined') refreshTermListOnSystemSel(this.options[this.selectedIndex].id)" style="display:none;" ></select>
  865 + <select id="AABodySystems" class="form-control" onchange="if (typeof (this.selectedIndex) != 'undefined') refreshTermListOnSystemSel(this.options[this.selectedIndex].id)" style="display:none;"></select>
856 866 </div>
857 867 </div>
858 868 <div class="form-group">
... ... @@ -1025,7 +1035,7 @@
1025 1035 </div>
1026 1036  
1027 1037 <!--Export Image Modal-->
1028   - <div class="modal fade export-image ui-draggable in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  1038 + <div class="modal fade export-image ui-draggable in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
1029 1039 style="z-index: 1200002;">
1030 1040 <div class="modal-dialog modal-sm" role="document">
1031 1041 <div class="modal-content">
... ... @@ -1229,7 +1239,7 @@
1229 1239 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
1230 1240 <h4 class="text-left lhgt19 padd5" style="color:#fff; text-align:left;">Modules Availability</h4>
1231 1241 </div>
1232   -
  1242 +
1233 1243 <div class="modal-body">
1234 1244 <div class="panel-body">
1235 1245 <!-- form -->
... ... @@ -1252,7 +1262,7 @@
1252 1262 <div class="form-group">
1253 1263 <div class="col-sm-12"><i>• Curriculum Builder (To be available by 09/25/2017)</i></div>
1254 1264 </div>
1255   -
  1265 +
1256 1266 <div class="form-group">
1257 1267 <div class="col-sm-8"><i>• Anatomy Test (To be available by 08/28/2017)</i></div>
1258 1268 </div>
... ... @@ -1310,15 +1320,16 @@
1310 1320  
1311 1321 <div class="modal-body" style="width: 597px; height: 400px; overflow-x: auto;">
1312 1322 <div class="panel-body">
1313   - <div id="dvTerms" style="font-size: 13px;"></div>
  1323 + <div id="dvTerms" style="font-size: 13px;"></div>
1314 1324 </div>
1315 1325 </div>
1316   - <div class="modal-footer ui-draggable-handle " style="color: #ffffff; cursor:default;"> <!--background-color: #0095da; border-color: #007ab3;-->
  1326 + <div class="modal-footer ui-draggable-handle " style="color: #ffffff; cursor:default;">
  1327 + <!--background-color: #0095da; border-color: #007ab3;-->
1317 1328 <!-- form -->
1318 1329 <form class="form-horizontal">
1319 1330 <!--<div class="form-group">-->
1320   - <div style="clear: left; float: left; color: #000;"><input type="checkbox" id="chkAccept" ng-model="checked" style="vertical-align: top;"/> I accept</div>
1321   - <div style="float: right;"><button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" ng-disabled="!checked" data-dismiss="modal" ng-click="UpdateLicenseTermStatus()"><i class="fa fa-check"></i> Next</button></div>
  1331 + <div style="clear: left; float: left; color: #000;"><input type="checkbox" id="chkAccept" ng-model="checked" style="vertical-align: top;" /> I accept</div>
  1332 + <div style="float: right;"><button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" ng-disabled="!checked" data-dismiss="modal" ng-click="UpdateLicenseTermStatus()"><i class="fa fa-check"></i> Next</button></div>
1322 1333 <!--</div>-->
1323 1334 </form>
1324 1335 </div>
... ... @@ -1480,10 +1491,10 @@
1480 1491  
1481 1492 <script>
1482 1493  
1483   - $(function () {
1484   - $('[data-toggle="tooltip"]').tooltip();
1485   - })
1486   -
  1494 + $(function () {
  1495 + $('[data-toggle="tooltip"]').tooltip();
  1496 + })
  1497 +
1487 1498 </script>
1488 1499 <script>
1489 1500 (function ($) {
... ... @@ -1796,14 +1807,14 @@
1796 1807 }
1797 1808 });
1798 1809 $("#btnBrushSizeDecrease").click(function () {
1799   -
  1810 +
1800 1811 onBrushSizeChange();
1801 1812 var brushDecreaseVar = $("#btnBrushSize").val();
1802 1813 if (brushDecreaseVar == "") {
1803 1814  
1804 1815 $("#btnBrushSizeDecrease").css({ "pointer-events": "none", "opacity": ".5" });
1805 1816 $("#btnBrushSizeDecrease").css({ "pointer-events": "none", "opacity": ".5" });
1806   -
  1817 +
1807 1818 }
1808 1819 else if (brushDecreaseVar <= 1) {
1809 1820 $("#slider-range-min-2").slider("value", 1);
... ... @@ -1813,7 +1824,7 @@
1813 1824 $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": ".5" });
1814 1825 $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": ".5" });
1815 1826 }
1816   -
  1827 +
1817 1828 }
1818 1829 else {
1819 1830 var brushDecrementedValue = parseInt(brushDecreaseVar) - 1;
... ... @@ -1921,7 +1932,7 @@
1921 1932 <script>
1922 1933 $(function () {
1923 1934 $("#btnSaveEI").click(function () {
1924   - $("#canvasDiv").append("<img id='exportlogo' class='img-responsive' src='content/images/adam-logo-small.png'/>");
  1935 + $("#canvasDiv").append("<img id='exportlogo' class='img-responsive' src='content/images/adam-logo-small.png'/>");
1925 1936 html2canvas($("#canvasDiv"), {
1926 1937 onrendered: function (canvas) {
1927 1938 theCanvas = canvas;
... ...
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
... ... @@ -601,6 +601,7 @@ ul.listgrid-view li.active, ul.listgrid-view li:active{ background:#0095da!impo
601 601 .font13{ font-size:13px;}
602 602 .font11{ font-size:11px;}
603 603 .modal-footer{ padding:5px 10px;}
  604 +.modal-footer-forgot-password {padding:5px 15px;}
604 605 .paddTop0{ padding-top:0;}
605 606 .no-margin-top{ margin-top:0;}
606 607  
... ...