Commit 528471bd22ee86e0db2e338405b8cab65a85570f

Authored by Nikita Kulshreshtha
2 parents 06560f40 913d69ee

Merge branch 'SiteUrlIntegration' of http://gitlab.ebix.com/ADAM/AIAHTML5 into Develop

400-SOURCECODE/AIAHTML5+FlexCB/AppStartup.mxml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<mx:Application implements="com.adam.aia.IAppBase,com.magic.mvc.container.IMVCContainer"
  3 + xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:kapit="fr.kapit.*"
  4 + xmlns:controller="com.adam.aia.appstartup.controller.*"
  5 + width="100%" height="100%" layout="absolute"
  6 + backgroundColor="#000000"
  7 + preinitialize="executePreinitializationTasks()"
  8 + creationComplete="onCreationComplete();"
  9 + verticalScrollPolicy="off" horizontalScrollPolicy="off">
  10 + <!--<kapit:KapInspect />-->
  11 + <mx:Script>
  12 + <![CDATA[
  13 + import com.adam.aia.CommonUtil;
  14 + import com.adam.aia.IAppBase;
  15 + import com.adam.aia.appstartup.event.StartupEventConst;
  16 + import com.adam.aia.appstartup.model.UserContextVO;
  17 + import com.adam.aia.appstartup.util.StartupOSTConst;
  18 + import com.adam.aia.appstartup.view.LoginView;
  19 + import com.adobe.cairngorm.business.ServiceLocator;
  20 + import com.adobe.cairngorm.events.UMEvent;
  21 + import com.magic.flexmdi.manager.MDIModuleWindowManager;
  22 + import com.magic.mvc.container.IMVCContainer;
  23 + import com.magic.mvc.container.MVCVBox;
  24 + import com.magic.mvc.context.IMVCContext;
  25 + import com.magic.mvc.context.MVCContextManager;
  26 + import com.magic.util.LocaleManager;
  27 + import com.magic.util.OSTManager;
  28 + import com.magic.util.UriUtil;
  29 + import com.magic.util.cache.CacheManager;
  30 +
  31 + import mx.controls.Alert;
  32 + import mx.controls.ProgressBar;
  33 + import mx.controls.SWFLoader;
  34 + import mx.events.FlexEvent;
  35 + import mx.managers.BrowserManager;
  36 + import mx.managers.SystemManager;
  37 + //import fr.kapit.KapInspect;
  38 +
  39 + public const LOGIN_SUCCESS:String = "LoginSuccess";
  40 + public const LOAD_LOGIN_APP:String = "LoadLoginApp";
  41 + public const LOAD_ADMIN_APP:String = "LoadAdminApp";
  42 + public const LOAD_MAIN_APP:String = "LoadContainerApp";
  43 + public const GET_USER_CONTEXT:String = "GetUserContext";
  44 +
  45 + private const APP_ADMIN:String = "AppAdmin.swf";
  46 + private const APP_MAIN:String = "AppMain.swf";
  47 + private const APP_STARTUP:String = "AppStartup.swf";
  48 + private const LOCALE_XML:String = "locale.xml";
  49 +
  50 +
  51 + import com.adam.pattern.Request;
  52 + import com.adam.pattern.Response;
  53 + import com.adam.aia.appstartup.business.AppStartupConst;
  54 + import com.adam.aia.appstartup.business.StartupRemoteDelegate;
  55 + import com.adam.aia.appstartup.business.StartupRemoteDelegate;
  56 +
  57 + //******************************************************
  58 + // Public properties
  59 + //******************************************************
  60 +
  61 + private var _objSwfLoader:SWFLoader;
  62 + private var _objProgressBar:ProgressBar;
  63 +
  64 + private const APPSTARTUP_OST_XML:String = "appstartup_ost.xml";
  65 + private const CONTENT_PATH:String = "content_path";
  66 + private const PATH_SEPARATOR:String="/";
  67 +
  68 +
  69 + public var _cmpLoginView:LoginView;
  70 +
  71 + public var objGlobalUserContext:UserContextVO = new UserContextVO();
  72 +
  73 +
  74 +
  75 + /**
  76 + * Override of initialized method to defer application initialization
  77 + * finish until AFTER the runtime style has been loaded
  78 + *
  79 + * @param value Has the UIComponent/application been initialized
  80 + */
  81 + override public function set initialized(value:Boolean):void
  82 + {
  83 + // Hold off until the Runtime CSS SWF is done loading.
  84 + }
  85 +
  86 + /**
  87 + * This function is responsible for invoking task which needed to be done before initialization.
  88 + * Basically the initialize the LocaleManager with the locale info.
  89 + *
  90 + */
  91 + private function executePreinitializationTasks():void
  92 + {
  93 + //new KapInspect();
  94 +
  95 + setupMVCContextManager();
  96 + // just for the sake of initializing this first
  97 + ServiceLocator.getInstance();
  98 + MDIModuleWindowManager.getInstance();
  99 + MVCContextManager.getInstance();
  100 +
  101 + LocaleManager.getInstance().addEventListener(Event.COMPLETE,onLocale);
  102 + LocaleManager.getInstance().load(UriUtil.getAbsoluteUriFromApplication(LOCALE_XML));
  103 + }
  104 +
  105 + /**
  106 + * Once the locale xml is loaded and initialized the proceed
  107 + *
  108 + */
  109 + private function onLocale(objEvent:Event):void
  110 + {
  111 + super.initialized = true;
  112 + }
  113 +
  114 + /**
  115 + * Function implementation for IAppBase.doAction()
  116 + * This is the only window to the AppBase any call should be made through this only
  117 + */
  118 + public function doAction(strActionId:String, ...args):*
  119 + {
  120 + BrowserManager.getInstance().init("","A.D.A.M. Interactive Anatomy");
  121 + //displayError
  122 + switch(strActionId)
  123 + {
  124 + case LOGIN_SUCCESS:
  125 + loadApp(UriUtil.getAbsoluteUriFromApplication(APP_MAIN));
  126 + break;
  127 + case LOAD_ADMIN_APP:
  128 + loadApp(UriUtil.getAbsoluteUriFromApplication(APP_ADMIN));
  129 + break;
  130 + case LOAD_LOGIN_APP:
  131 + loadLoginView();
  132 + break;
  133 + case GET_USER_CONTEXT:
  134 + return objGlobalUserContext;
  135 + break;
  136 + }
  137 + }
  138 +
  139 + /**
  140 + * function to load an application swf. creates a new swf load instance and loads the application in that.
  141 + * if there is already another application running then it will first unload that
  142 + * @param : strPath - uri to the application swf that needs to be loaded
  143 + * @return : void
  144 + */
  145 + private function loadApp(strPath:String):void
  146 + {
  147 + unloadApp();
  148 + var objLoadContext:LoaderContext = new LoaderContext(false,
  149 + ApplicationDomain.currentDomain);
  150 + _objSwfLoader = new SWFLoader();
  151 + _objSwfLoader.visible = false;
  152 + _objSwfLoader.percentHeight = 100;
  153 + _objSwfLoader.percentWidth = 100;
  154 + _objSwfLoader.showBusyCursor = true;
  155 + _objSwfLoader.addEventListener(Event.COMPLETE, onAppLoadComplete);
  156 + _objSwfLoader.addEventListener(IOErrorEvent.IO_ERROR,
  157 + onAppLoadIOError);
  158 + _objSwfLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
  159 + onAppLoadSecurityError);
  160 + _objProgressBar = CommonUtil.getProgressBar(this, _objSwfLoader, CommonUtil.APP_LOADER_STRING);
  161 + /*
  162 + _objProgressBar.width = 300;
  163 + _objProgressBar.x = (width-300)/2;
  164 + _objProgressBar.y = (height)/2;
  165 + _objProgressBar.mode = "pool";
  166 + _objProgressBar.label = APP_LOADER_STRING;
  167 + _objProgressBar.source = _objSwfLoader;
  168 + */
  169 + addChild(_objSwfLoader);
  170 + //addChild(_objProgressBar);
  171 + _objSwfLoader.loaderContext = objLoadContext;
  172 + _objSwfLoader.source = strPath;
  173 +
  174 + }
  175 +
  176 + private function setupMVCContextManager():void
  177 + {
  178 + MVCContextManager.getInstance().flush();
  179 + //register Global MVC context
  180 + MVCContextManager.getInstance().createGlobalContext(
  181 + _objModelLocator,
  182 + _objViewLocator,
  183 + _objFrontController);
  184 + }
  185 + /**
  186 + * unloads the currently loaded application.
  187 + * @param : none
  188 + * @return : void
  189 + */
  190 + private function unloadApp():void
  191 + {
  192 + unloadLoginView();
  193 + if(_objSwfLoader != null)
  194 + {
  195 +
  196 + cleanupApplication();
  197 + MDIModuleWindowManager.getInstance().flush();
  198 + MVCContextManager.getInstance().flush();
  199 + com.magic.util.CacheManager.getInstance().flush();
  200 + com.magic.util.cache.CacheManager.getInstance().dispose();
  201 + _objSwfLoader.source = null;
  202 + removeChild(_objSwfLoader);
  203 + _objSwfLoader = null;
  204 +
  205 + }
  206 + }
  207 +
  208 + /**
  209 + * This function retrieves the loaded application and invokes its prepareToUnload function.
  210 + *
  211 + * @param none
  212 + * @return none
  213 + */
  214 + private function cleanupApplication():void
  215 + {
  216 + if(_objSwfLoader.content == null)
  217 + {
  218 + return;
  219 + }
  220 + //
  221 + var objSystemManager:SystemManager = SystemManager(_objSwfLoader.content);
  222 + if(objSystemManager && objSystemManager.application)
  223 + {
  224 + var objApplication:Object = Object(objSystemManager.application);
  225 + if(objApplication.hasOwnProperty("prepareToUnload"))
  226 + {
  227 + objApplication["prepareToUnload"]()
  228 + }
  229 + }
  230 + }
  231 + /**
  232 + * event handler on application swf load complete. Remove the progress bar.
  233 + * @param : objEvent
  234 + * @return : void
  235 + */
  236 + private function onAppLoadComplete(objEvent:Event):void
  237 + {
  238 + if(_objProgressBar != null && _objSwfLoader != null)
  239 + {
  240 + _objSwfLoader.showBusyCursor = false;
  241 + _objSwfLoader.visible = true;
  242 + removeChild(_objProgressBar);
  243 + _objProgressBar = null;
  244 + }
  245 + }
  246 +
  247 + /**
  248 + * Event handler of input/output error. prompt the error message to the user.
  249 + * @param : none
  250 + * @return : void
  251 + */
  252 + private function onAppLoadIOError(objEvent:IOErrorEvent):void
  253 + {
  254 + // display error message
  255 + }
  256 +
  257 + /**
  258 + * Event handler of security error. prompt the error message to the user.
  259 + * @param : none
  260 + * @return : void
  261 + */
  262 + private function onAppLoadSecurityError(objEvent:SecurityErrorEvent):void
  263 + {
  264 + // display error message
  265 + }
  266 +
  267 + /**
  268 + * function to load AppStartup.swf on creationComplete event
  269 + * @param : none
  270 + * @return : void
  271 + */
  272 + private function onCreationComplete():void
  273 + {
  274 + // systemManager.addEventListener(FlexEvent.IDLE, handleApplicationIdle);
  275 + //NIKITA 25July18
  276 + //doAction(LOAD_LOGIN_APP);
  277 + var un:String = mx.core.Application.application.parameters.username;
  278 + var up:String = mx.core.Application.application.parameters.password;
  279 +
  280 + //Alert.show(un+", "+up);
  281 + //Encryption of the password for more security
  282 + /*var saltValue:String = 'A1B2C3D4E5F6G7H8I9';
  283 + var password:String = event.data.password + saltValue;
  284 + var sha1:SHA1 = new SHA1();
  285 + var src:ByteArray = new ByteArray();
  286 + src.writeUTFBytes(password);
  287 + var digest:ByteArray = sha1.hash(src);
  288 + var passwordHash:String = Hex.fromArray(digest);*/
  289 +
  290 + var objData:Object = new Object();
  291 + objData.loginId = un;
  292 + objData.password = up;
  293 +
  294 + var objEvent:UMEvent = new UMEvent(StartupEventConst.EVENT_LOGIN_CLICK,null,true,false,objData);
  295 + objEvent.dispatch();
  296 +
  297 + // doAction(LOGIN_SUCCESS);
  298 + //25July18
  299 +
  300 + //loadApp(UriUtil.getAbsoluteUriFromApplication(APP_STARTUP));
  301 + }
  302 + private function handleApplicationIdle(event:FlexEvent):void
  303 + {
  304 + //Alert.show("IDLE");
  305 + if(event.currentTarget.mx_internal::idleCounter == 480){
  306 + Alert.show("Time out happened");
  307 + ExternalInterface.call("setUserIdleValue");
  308 + }
  309 + }
  310 + private function loadLoginView():void
  311 + {
  312 + unloadApp();
  313 + if(_cmpLoginView != null && _cmpLoginView.visible == false)
  314 + {
  315 + _cmpLoginView.visible = true;
  316 + return;
  317 + }
  318 +
  319 + //Intially load the appstartup_ost.xml for the Static UI data
  320 + OSTManager.getInstance().addEventListener(Event.COMPLETE,onOstComplete);
  321 + var uri:String = CommonUtil.getRelativeContentUri(APPSTARTUP_OST_XML );
  322 + OSTManager.getInstance().load(uri);
  323 + }
  324 +
  325 +
  326 +
  327 + private function unloadLoginView():void
  328 + {
  329 + if(_cmpLoginView)
  330 + {
  331 + _cmpLoginView.visible = false;
  332 + removeChild(_cmpLoginView);
  333 +
  334 + _cmpLoginView = null;
  335 +
  336 + }
  337 + }
  338 +
  339 + /**
  340 + * Function implementation for IMVCContainer.getInherentMvcContext()
  341 + * returns the its MVC context.
  342 + *
  343 + */
  344 + public function getInherentMvcContext():IMVCContext
  345 + {
  346 + return MVCContextManager.getInstance().getGlobalContext();
  347 + }
  348 + /**
  349 + * once the appstartup_ost.xml load do action proceed
  350 + */
  351 + private function onOstComplete(objEvent:Event):void
  352 + {
  353 +
  354 + OSTManager.getInstance().removeEventListener(Event.COMPLETE,onOstComplete);
  355 + CommonUtil.APP_LOADER_STRING = OSTManager.getInstance().getValue(StartupOSTConst.LOADING);
  356 + setupMVCContextManager();
  357 + _cmpLoginView = new LoginView();
  358 + _cmpLoginView.percentHeight = 100;
  359 + _cmpLoginView.percentWidth = 100;
  360 + _cmpLoginView.minWidth = 972;
  361 + _cmpLoginView.minHeight = 648;
  362 + addChild(_cmpLoginView);
  363 +
  364 +
  365 + }
  366 + ]]>
  367 + </mx:Script>
  368 +
  369 + <!--
  370 + Initialize MVC Framework classes
  371 + -->
  372 + <mx:Style source="css/Global.css"/>
  373 + <mx:Style source="css/Toolbars.css"/>
  374 + <service:AIAServiceLocator id="_objRemoteService" xmlns:service="com.adam.aia.business.*" />
  375 +
  376 + <controller:StartupFrontController id="_objFrontController" xmlns:contoller="com.adam.aia.appstartup.controller.*" />
  377 + <viewlocator:LocalViewLocator id="_objViewLocator" xmlns:viewlocator="com.magic.cairngorm.view.*" />
  378 + <modellocator:StartupModelLocator id="_objModelLocator" xmlns:modellocator="com.adam.aia.appstartup.model.*" />
  379 + <viewhelper:AppStartupViewHelper id="_objViewHelper" xmlns:viewhelper="com.adam.aia.appstartup.view.helper.*" />
  380 +
  381 +</mx:Application>
400-SOURCECODE/AIAHTML5+FlexCB/Default.aspxPassingunamePassForOldCB 0 → 100644
  1 +<%@ Page Language="C#" AutoEventWireup="True" Inherits="_Default" Codebehind="Default.aspx.cs" %>
  2 +
  3 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4 +
  5 +<html lang="en">
  6 +
  7 + <head>
  8 + <title>A.D.A.M. Interactive Anatomy</title>
  9 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10 + <meta http-equiv="X-UA-Compatible" content="IE=11"/>
  11 +
  12 + <script type="text/javascript">
  13 + //var appVersion = 'v107';
  14 + //Below code is for opening CB directly from AIAHTML5 as CB is not ready
  15 + //till Aug2018 and new AIAHTML5 is going live. v1018 is having the code which opens CB with user authentication
  16 + var appVersion = 'v1018';
  17 +
  18 + </script>
  19 +
  20 + <script type="text/javascript" src="v1018/js/lib/jquery-1.8.1.min.js?vers=v1018"></script>
  21 + <script type="text/javascript" src="v1018/js/AC_OETags.js?vers=v1018"></script>
  22 + <script type="text/javascript" src="http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js?vers=v1018"></script>
  23 + <!--<script type="text/javascript" src="v1018/js/unity3D.js?vers=v1018"></script>-->
  24 + <script type="text/javascript" src="v1018/js/dynamicDiv.js?vers=v1018"></script>
  25 + <script type="text/javascript" src="v1018/js/functions.js?vers=v1018"></script>
  26 + <!--<script type="text/javascript" src="v1018/history/history.js?vers=v1018"></script>-->
  27 + <!--<script type="text/javascript" src="v1018/js/maintenanceProperties.js?vers=v1018></script>
  28 + <script type="text/javascript" src="v1018/js/messagePopUp.js?vers=v1018"></script>-->
  29 +<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script>
  30 + <link rel="stylesheet" type="text/css" href="v1018/history/history.css" />
  31 +
  32 + <style type="text/css">
  33 + html { height:100%; overflow:hidden; }
  34 + body { margin: 0px;padding:0px; height:100%; }
  35 + </style>
  36 +
  37 + <script type='text/VBScript'>
  38 + function DetectUnityWebPlayerActiveX
  39 + on error resume next
  40 + dim tControl
  41 + dim res
  42 + res = 0
  43 + set tControl = CreateObject("UnityWebPlayer.UnityWebPlayer.1")
  44 + if IsObject(tControl) then
  45 + res = 1
  46 + end if
  47 + DetectUnityWebPlayerActiveX = res
  48 + end function
  49 + </script>
  50 + <script type="text/javascript">
  51 + if (tempTrace == null) { function tempTrace(message) { try { if (console != null && console.log != null) { console.log(message); } } catch (e) { } } }
  52 + </script>
  53 + <script type="text/javascript">
  54 +
  55 + function resizeFlashDivHeight() {
  56 + $('#flashDiv').height(window.document.body.offsetHeight);
  57 + };
  58 +
  59 + window.onresize = function () { setTimeout(resizeFlashDivHeight, 250); };
  60 + $(document).ready(resizeFlashDivHeight);
  61 +
  62 + function logoutUserNormal() {
  63 + tempTrace("Default.aspx * DEBUG logoutUserNormal()");
  64 + // $.post('http://' + window.location.host + '/LogoutUser.aspx', {}, '');
  65 + //return "This request will cause to Logout from the application, You will have to login again to access the application.";
  66 + return "Warning: You are leaving this product without logging out. If you continue, your information will be lost and your account will lock for 5 minutes.";
  67 + }
  68 + function logoutUser(evt) {
  69 + tempTrace("Default.aspx * DEBUG logoutUser()");
  70 + if (typeof evt == 'undefined') {
  71 + evt = window.event;
  72 + }
  73 + tempTrace("Default.aspx * DEBUG logoutUser() evt = " + evt);
  74 + //if (evt && evt.clientX >= (window.event.screenX - 150) && evt.clientY >= -150 && evt.clientY <= 0) { //NOTE: Chrome did not return any clientX info.
  75 + if (evt && evt.clientY >= -150 && evt.clientY <= 0) { //NOTE: Chrome did not return any clientX info.
  76 + //$.post('http://' + window.location.host + '/LogoutUser.aspx', {}, '');
  77 + return "Warning: You are leaving this product without logging out. If you continue, your information will be lost and your account will lock for 5 minutes.";
  78 + }
  79 + }
  80 + if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.toLowerCase().indexOf("win") != -1) {
  81 + window.onbeforeunload = logoutUser;//function () { return logoutUser(); };
  82 + } else {
  83 + window.onbeforeunload = logoutUserNormal;
  84 + }
  85 +
  86 + // Function to check the page opener and reload the parent if openner is an iframe.
  87 + function checkOpener() {
  88 + // Check if page is loading iside an iFrame.
  89 + if (top != self) {
  90 + parent.location.reload();
  91 + }
  92 + }
  93 + </script>
  94 + <script language="JavaScript" type="text/javascript">
  95 +
  96 + // -----------------------------------------------------------------------------
  97 + // Globals
  98 + // Major version of Flash required
  99 + var requiredMajorVersion = 10;
  100 + // Minor version of Flash required
  101 + var requiredMinorVersion = 0;
  102 + // Minor version of Flash required
  103 + var requiredRevision = 0;
  104 + // -----------------------------------------------------------------------------
  105 +
  106 + //----------------- Unity Player check ----------------------
  107 + function DetectUnityWebPlayer() {
  108 + tempTrace("Default.aspx * DEBUG DetectUnityWebPlayer()");
  109 + var tInstalled = false;
  110 + if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.toLowerCase().indexOf("win") != -1) {
  111 + tInstalled = DetectUnityWebPlayerActiveX();
  112 + }
  113 + else {
  114 + if (navigator.mimeTypes && navigator.mimeTypes["application/vnd.unity"]) {
  115 + if (navigator.mimeTypes["application/vnd.unity"].enabledPlugin && navigator.plugins && navigator.plugins["Unity Player"]) {
  116 + tInstalled = true;
  117 + }
  118 + }
  119 + }
  120 + return tInstalled;
  121 + }
  122 +
  123 + function GetUnityInstallerPath() {
  124 + tempTrace("Default.aspx * DEBUG GetUnityInstallerPath()");
  125 + var tDownloadURL = "";
  126 + var hasXpi = navigator.userAgent.toLowerCase().indexOf("firefox") != -1;
  127 +
  128 + // Use standalone installer
  129 + if (navigator.platform == "MacIntel")
  130 + tDownloadURL = "http://webplayer.unity3d.com/download_webplayer-3.x/webplayer-i386.dmg";
  131 + else if (navigator.platform == "MacPPC")
  132 + tDownloadURL = "http://webplayer.unity3d.com/download_webplayer-3.x/webplayer-ppc.dmg";
  133 + else if (navigator.platform.toLowerCase().indexOf("win") != -1)
  134 + tDownloadURL = "http://webplayer.unity3d.com/download_webplayer-3.x/UnityWebPlayer.exe";
  135 + return tDownloadURL;
  136 + }
  137 + </script>
  138 +
  139 + </head>
  140 +<body>
  141 +<script type="text/javascript">
  142 + var maintenancePropertiesJs = document.createElement('script');
  143 + maintenancePropertiesJs.src = appVersion +"/js/maintenanceProperties.js?v="+new Date().getTime();
  144 + var messagePopUpJs = document.createElement('script');
  145 + messagePopUpJs.src = appVersion +"/js/messagePopUp.js?v="+new Date().getTime();
  146 + var head = document.getElementsByTagName('head')[0];
  147 + head.appendChild(maintenancePropertiesJs);
  148 + setTimeout(function(){
  149 + head.appendChild(messagePopUpJs);
  150 + },100);
  151 +</script>
  152 +<div id="flashDiv" style="z-index:0">
  153 + <script type="text/javascript">
  154 +
  155 + //Below is for opening CB directly from AIAHTML5 as CB is not ready
  156 + //till Aug2018 and new AIAHTML5 is going live.
  157 +
  158 + var UserName = new URL(location.href).searchParams.get('un');
  159 + var UserPassword = new URL(location.href).searchParams.get('up');
  160 +
  161 +
  162 + var key = CryptoJS.enc.Base64.parse("MTIzNDU2NzgxMjM0NTY3OA");
  163 + var iv = CryptoJS.enc.Base64.parse("EBESExQVFhcYGRobHB0eHw");
  164 +
  165 +
  166 + var decryptedUserName = (CryptoJS.AES.decrypt(UserName, key, { iv: iv })).toString(CryptoJS.enc.Utf8);
  167 + var decryptedPassword = (CryptoJS.AES.decrypt(UserPassword, key, { iv: iv })).toString(CryptoJS.enc.Utf8);
  168 +
  169 +
  170 +
  171 + // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
  172 + var hasProductInstall = DetectFlashVer(6, 0, 65);
  173 +
  174 + // alert('has Player: ' + hasProductInstall);
  175 +
  176 + // Version check based upon the values defined in globals
  177 + var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
  178 +
  179 + if (hasProductInstall && !hasRequestedVersion) {
  180 + // DO NOT MODIFY THE FOLLOWING FOUR LINES
  181 + // Location visited after installation is complete if installation is required
  182 + var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
  183 + var MMredirectURL = window.location;
  184 + document.title = document.title.slice(0, 47) + " - Flash Player Installation";
  185 + var MMdoctitle = document.title;
  186 + window.location.href = 'http://qa.interactiveanatomy.com/AdobePlayerDownloadLink.html';
  187 +
  188 + } else if (hasRequestedVersion) {
  189 + tempTrace("Default.aspx * DEBUG hasRequestedVersion write will occur");
  190 + // if we've detected an acceptable version
  191 + // embed the Flash Content SWF when all tests are passed
  192 + var params = "<%=urlParams%>";
  193 + AC_FL_RunContent(
  194 + "src", appVersion + "/AppStartup" + params,
  195 + "width", "100%",
  196 + "height", "100%",
  197 + "align", "middle",
  198 + "id", "flashObject",
  199 + "quality", "high",
  200 + "bgcolor", "#000000",
  201 + "name", "flashObject",
  202 + "wmode", "opaque",
  203 + "allowScriptAccess", "sameDomain",
  204 + "type", "application/x-shockwave-flash",
  205 + "pluginspage", "http://www.adobe.com/go/getflashplayer",
  206 + "FlashVars","username="+decryptedUserName+"&password="+decryptedPassword
  207 +
  208 + );
  209 + } else
  210 + {
  211 + // THE CODE ON 15th MACHINE flash is too old or we can't detect the plugin
  212 + tempTrace("Default.aspx * DEBUG objNewInstall write will occur");
  213 + window.location.href = 'http://qa.interactiveanatomy.com/AdobePlayerDownloadLink.html';
  214 +
  215 +
  216 + }
  217 +
  218 + </script>
  219 +<noscript><p>JavaScript is not activated.</p></noscript>
  220 +
  221 +</div>
  222 + <!-- Here Test -->
  223 + <div id="myConsole" runat="server"></div>
  224 +</body>
  225 +</html>
0 \ No newline at end of file 226 \ No newline at end of file
400-SOURCECODE/AIAHTML5+FlexCB/ShadowedTextToggleButtonBar.as 0 → 100644
  1 +package com.magic.component
  2 +{
  3 + import flash.events.MouseEvent;
  4 +
  5 + import mx.controls.ToggleButtonBar;
  6 + import mx.core.ClassFactory;
  7 + import mx.core.IFlexDisplayObject;
  8 + import mx.core.IUITextField;
  9 + import mx.styles.CSSStyleDeclaration;
  10 + import flash.events.KeyboardEvent;
  11 + import mx.styles.StyleManager;
  12 +
  13 + public class ShadowedTextToggleButtonBar extends ToggleButtonBar
  14 + {
  15 + private var navItemFactory:ClassFactory;
  16 +
  17 + private var buttonStyleNameProp:String = "buttonStyleName";
  18 +
  19 + /**
  20 + * @private
  21 + * Name of style used to specify buttonStyleName.
  22 + * Overridden by TabBar.
  23 + */
  24 + private var firstButtonStyleNameProp:String = "firstButtonStyleName";
  25 +
  26 + /**
  27 + * @private
  28 + * Name of style used to specify buttonStyleName.
  29 + * Overridden by TabBar.
  30 + */
  31 + private var lastButtonStyleNameProp:String = "lastButtonStyleName";
  32 +
  33 + /**
  34 + * @private
  35 + * Name of style used to specify buttonWidth.
  36 + * Overridden by TabBar.
  37 + */
  38 + private var buttonWidthProp:String = "buttonWidth";
  39 +
  40 + /**
  41 + * @private
  42 + * Name of style used to specify buttonHeight.
  43 + * Overridden by TabBar.
  44 + */
  45 + private var buttonHeightProp:String = "buttonHeight";
  46 +
  47 + private var recalcButtonWidths:Boolean = false;
  48 +
  49 + /**
  50 + * @private
  51 + * Flag indicating whether buttons heights should be recalculated.
  52 + */
  53 + private var recalcButtonHeights:Boolean = false;
  54 +
  55 + public function ShadowedTextToggleButtonBar()
  56 + {
  57 + //TODO: implement function
  58 + super();
  59 + navItemFactory = new ClassFactory(ShadowedTextButton);
  60 + }
  61 + // overridden to block keyboard temporarily.
  62 + override protected function keyDownHandler(event:KeyboardEvent):void
  63 + {
  64 + //do nothing
  65 + }
  66 + override protected function createNavItem(strLabel:String, clsIcon:Class=null):IFlexDisplayObject
  67 + {
  68 + var newButton:ShadowedTextButton = ShadowedTextButton(navItemFactory.newInstance());
  69 + // Set tabEnabled to false so individual buttons don't get focus.
  70 + newButton.focusEnabled = false;
  71 +
  72 + var buttonStyleName:String = getStyle(buttonStyleNameProp);
  73 + var firstButtonStyleName:String = getStyle(firstButtonStyleNameProp);
  74 + var lastButtonStyleName:String = getStyle(lastButtonStyleNameProp);
  75 +
  76 + if (!buttonStyleName)
  77 + buttonStyleName = "ButtonBarButton";
  78 + if (!firstButtonStyleName)
  79 + firstButtonStyleName = buttonStyleName;
  80 + if (!lastButtonStyleName)
  81 + lastButtonStyleName = buttonStyleName;
  82 +
  83 + var n:int = numChildren;
  84 + if (n == 0)
  85 + {
  86 + newButton.styleName = buttonStyleName;
  87 + }
  88 + else
  89 + {
  90 + if(strLabel!="Curriculum Builder"){
  91 + newButton.styleName = lastButtonStyleName;
  92 + //var CBuilderButton:ShadowedTextButton = ShadowedTextButton(getChildAt(6));
  93 + //CBuilderButton.setStyle("color","#000000");
  94 + }
  95 + else{
  96 + newButton.setStyle("color","#0000FF");
  97 + }
  98 + var cssStyleDeclaration:CSSStyleDeclaration =
  99 + StyleManager.getStyleDeclaration("." + lastButtonStyleName);
  100 +
  101 + if (cssStyleDeclaration &&
  102 + !cssStyleDeclaration.getStyle("focusRoundedCorners"))
  103 + {
  104 + newButton.setStyle("focusRoundedCorners", "tr br");
  105 + }
  106 +
  107 + // Refresh the skins for the last button that was in this position.
  108 + var first:Boolean = (n == 1);
  109 + var lastButton:ShadowedTextButton = ShadowedTextButton(getChildAt(first ? 0 : n - 1));
  110 +
  111 + if (first)
  112 + {
  113 + lastButton.styleName = firstButtonStyleName;
  114 + cssStyleDeclaration =
  115 + StyleManager.getStyleDeclaration("." + firstButtonStyleName);
  116 +
  117 + if (cssStyleDeclaration &&
  118 + !cssStyleDeclaration.getStyle("focusRoundedCorners"))
  119 + {
  120 + lastButton.setStyle("focusRoundedCorners", "tl bl");
  121 + }
  122 + }
  123 + else
  124 + {
  125 + lastButton.styleName = buttonStyleName;
  126 + cssStyleDeclaration =
  127 + StyleManager.getStyleDeclaration("." + buttonStyleName);
  128 +
  129 + if (cssStyleDeclaration &&
  130 + !cssStyleDeclaration.getStyle("focusRoundedCorners"))
  131 + {
  132 + lastButton.setStyle("focusRoundedCorners", "");
  133 + }
  134 + }
  135 +
  136 + // lastButton.changeSkins();
  137 + lastButton.invalidateDisplayList();
  138 + }
  139 +
  140 + newButton.label = strLabel;
  141 + // newButton.setStyle("icon", icon);
  142 + newButton.minHeight=35;
  143 + //newButton.maxHeight=38;
  144 + newButton.addEventListener(MouseEvent.CLICK, clickHandler);
  145 +
  146 + this.addChild(newButton);
  147 +
  148 + recalcButtonWidths = recalcButtonHeights = true;
  149 + newButton.addTextFilter();
  150 + return newButton;
  151 + }
  152 +
  153 + }
  154 +}
0 \ No newline at end of file 155 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj
@@ -120,6 +120,7 @@ @@ -120,6 +120,7 @@
120 <Compile Include="Constants\ErrorHelper.cs" /> 120 <Compile Include="Constants\ErrorHelper.cs" />
121 <Compile Include="Controllers\AdminAccessController.cs" /> 121 <Compile Include="Controllers\AdminAccessController.cs" />
122 <Compile Include="Controllers\AuthenticateController.cs" /> 122 <Compile Include="Controllers\AuthenticateController.cs" />
  123 + <Compile Include="Controllers\ClientController.cs" />
123 <Compile Include="Controllers\ConfigurationController.cs" /> 124 <Compile Include="Controllers\ConfigurationController.cs" />
124 <Compile Include="Controllers\ForgotUserController.cs" /> 125 <Compile Include="Controllers\ForgotUserController.cs" />
125 <Compile Include="Controllers\LabExerciseController.cs" /> 126 <Compile Include="Controllers\LabExerciseController.cs" />
@@ -131,6 +132,7 @@ @@ -131,6 +132,7 @@
131 <DependentUpon>Global.asax</DependentUpon> 132 <DependentUpon>Global.asax</DependentUpon>
132 </Compile> 133 </Compile>
133 <Compile Include="Models\DBModel.cs" /> 134 <Compile Include="Models\DBModel.cs" />
  135 + <Compile Include="Models\IPValidator.cs" />
134 <Compile Include="Models\LabExercise.cs" /> 136 <Compile Include="Models\LabExercise.cs" />
135 <Compile Include="Models\PixelLocator.cs" /> 137 <Compile Include="Models\PixelLocator.cs" />
136 <Compile Include="Models\User.cs" /> 138 <Compile Include="Models\User.cs" />
@@ -146,7 +148,9 @@ @@ -146,7 +148,9 @@
146 </ItemGroup> 148 </ItemGroup>
147 <ItemGroup> 149 <ItemGroup>
148 <Content Include="Logs\AIALogs.log" /> 150 <Content Include="Logs\AIALogs.log" />
149 - <Content Include="packages.config" /> 151 + <Content Include="packages.config">
  152 + <SubType>Designer</SubType>
  153 + </Content>
150 <None Include="Properties\Settings.settings"> 154 <None Include="Properties\Settings.settings">
151 <Generator>SettingsSingleFileGenerator</Generator> 155 <Generator>SettingsSingleFileGenerator</Generator>
152 <LastGenOutput>Settings.Designer.cs</LastGenOutput> 156 <LastGenOutput>Settings.Designer.cs</LastGenOutput>
400-SOURCECODE/AIAHTML5.API/Constants/AIAConstants.cs
@@ -44,5 +44,44 @@ namespace AIAHTML5.API.Constants @@ -44,5 +44,44 @@ namespace AIAHTML5.API.Constants
44 public const string LAB_EXERCISE_SAVE_SUCCESS = "Your lab exercise attempt is saved."; 44 public const string LAB_EXERCISE_SAVE_SUCCESS = "Your lab exercise attempt is saved.";
45 public const string LAB_EXERCISE_SAVE_FAILURE = "We are unable to save your lab exercise attempt, please try again."; 45 public const string LAB_EXERCISE_SAVE_FAILURE = "We are unable to save your lab exercise attempt, please try again.";
46 public const string SAVED_LAB_EXERCISE_NOT_FOUND = "Saved Lab Exercise not found."; 46 public const string SAVED_LAB_EXERCISE_NOT_FOUND = "Saved Lab Exercise not found.";
  47 + public const string VALIDATED_CLIENT = "Valid Client.";
  48 + public const string INVALID_CLIENT = "InValid Client.";
  49 + public const string MSG_NOT_AUTHORIZE_SITE_USER = "User is not authorized.";
  50 +
  51 +
  52 + public const string STATUS_OK = "ok";
  53 + public const string STATUS_NOT_OK = "notok";
  54 + public const int NO_ERROR = 0;
  55 + public const int RUN_TIME_EXCEPTION = 10000;
  56 +
  57 + public const String SITE_IP = "siteIP";
  58 + public const String SITE_ID = "siteId";
  59 + public const String TERM_CONDITION = "termCondition";
  60 + public const String MODESTY_SETTING = "modestySetting";
  61 +
  62 + public const Byte SUPER_ADMIN = 1;
  63 + public const Byte GENERAL_ADMIN = 2;
  64 + public const String USER_NAME = "username";
  65 + public const String PASSWORD = "password";
  66 + public const String ERROR_ID = "errorId";
  67 + public const String LICENSE_ACTIVE = "licenceActive";
  68 + public const String ACCOUNT_NUMBER = "accountNumber";
  69 + public const String LICENSE_TYPE_ID = "licenceTypeId";
  70 + public const String TOTAL_LOGIN = "totalLogin";
  71 + public const String EDITION_ID = "editionId";
  72 + public const String URL_REFERER = "urlReferer";
  73 + public const String USER_CONTEXT = "usercontext";
  74 +
  75 + public const Byte CONCURRENT_USER = 6;
  76 + public const Byte SINGLE_USER = 5;
  77 + public const Byte SITE_USER = 9;
  78 +
  79 + public const String LICENSE_ID = "licenseId";
  80 + public const Byte LICENSE_TYPE_CONCURRENT = 1;
  81 + public const Byte LICENSE_TYPE_SINGLE = 2;
  82 + public const Byte LICENSE_TYPE_SITE = 3;
  83 + public const Byte LICENSE_TYPE_RESELLER = 4;
  84 + public const Byte LICENSE_TYPE_TEST = 5;
  85 +
47 } 86 }
48 } 87 }
49 \ No newline at end of file 88 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs
@@ -29,6 +29,10 @@ namespace AIAHTML5.API.Constants @@ -29,6 +29,10 @@ namespace AIAHTML5.API.Constants
29 public const string GET_BLOCKED_USERS_BY_USER_TYPE = "GetBlockedUserByUserType"; 29 public const string GET_BLOCKED_USERS_BY_USER_TYPE = "GetBlockedUserByUserType";
30 public const string SAVE_LAB_EXERCISE_ATTEMPT = "usp_SaveLabExerciseAttempts"; 30 public const string SAVE_LAB_EXERCISE_ATTEMPT = "usp_SaveLabExerciseAttempts";
31 public const string GET_LAB_EXERCISE = "GetLabExcerciseByUserId"; 31 public const string GET_LAB_EXERCISE = "GetLabExcerciseByUserId";
  32 + public const string GET_LICENSEINFO_BY_SITE_URL = "GetLicenseIdBySiteUrl";
  33 + public const string GET_LICENSE_BY_SITE_ID = "GetLicenseBySiteId";
  34 + public const string GET_LICENSE_EDITIONS_FOR_MODESTY = "GetLicenseEditionsForModesty";
  35 + public const string GET_PRODUCT_FEATURES = "GetProductFeatures";
32 36
33 } 37 }
34 } 38 }
35 \ No newline at end of file 39 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Controllers/ClientController.cs 0 → 100644
  1 +using AIAHTML5.API.Constants;
  2 +using System;
  3 +using System.Collections.Generic;
  4 +using System.Linq;
  5 +using System.Net;
  6 +using System.Net.Http;
  7 +using System.Web.Http;
  8 +using AIAHTML5.API.Models;
  9 +using Newtonsoft.Json.Linq;
  10 +using System.Data.SqlClient;
  11 +using System.Collections;
  12 +using log4net;
  13 +using Newtonsoft.Json;
  14 +
  15 +namespace AIAHTML5.API.Controllers
  16 +{
  17 + public class ClientController : ApiController
  18 + {
  19 + // GET api/client
  20 + public IEnumerable<string> Get()
  21 + {
  22 + return new string[] { "value1", "value2" };
  23 + }
  24 +
  25 + // GET api/client/5
  26 + public string Get(int id)
  27 + {
  28 + return "value";
  29 + }
  30 +
  31 + // POST api/client
  32 + public HttpResponseMessage Post([FromBody]JObject siteUrl)
  33 + {
  34 + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
  35 + logger.Debug("inside POST in ClientController");
  36 + try{
  37 + HttpResponseMessage response = null;
  38 + if (siteUrl != null)
  39 + {
  40 + if (!string.IsNullOrEmpty(siteUrl["siteIP"].ToString()) && !string.IsNullOrEmpty(siteUrl["remoteIPAddress"].ToString()) && !string.IsNullOrEmpty(siteUrl["accountNumber"].ToString()) && !string.IsNullOrEmpty(siteUrl["edition"].ToString()))
  41 +
  42 + {
  43 +
  44 + int siteId = AIAHTML5.API.Models.Users.ValidateLicenseSiteIP(siteUrl["siteIP"].ToString(), siteUrl["remoteIPAddress"].ToString(), siteUrl["accountNumber"].ToString(), Convert.ToByte(siteUrl["edition"].ToString()));
  45 + if (siteId > 0)
  46 + {
  47 + dynamic uerinfo = AIAHTML5.API.Models.Users.ValidateSiteLogin(siteUrl["siteIP"].ToString(), siteUrl["accountNumber"].ToString(), siteUrl["urlReferer"].ToString(), siteUrl["edition"].ToString(), siteId);
  48 + if (uerinfo != null)
  49 + response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(JsonConvert.SerializeObject(uerinfo)) };
  50 + else
  51 + {
  52 + //ser user = new User();
  53 + //user.LoginFailureCauseId = AIAConstants.INVALID_CLIENT;
  54 + //dynamic userinfo = user;
  55 + //response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(userInfo) };
  56 +
  57 + response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.INVALID_CLIENT) };
  58 + }
  59 + }
  60 +
  61 + else
  62 + {
  63 + response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.MSG_NOT_AUTHORIZE_SITE_USER) };
  64 +
  65 + }
  66 + }
  67 + }
  68 + else
  69 + {
  70 + response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = null };
  71 +
  72 + }
  73 +
  74 + return response;
  75 + }
  76 + catch (SqlException e)
  77 + {
  78 +
  79 + logger.Fatal("SqlException occured for siteUrl =" + siteUrl["siteIP"].ToString() + " and siteUrl= " + siteUrl["siteIP"].ToString() + " & accountNumber = " + siteUrl["accountNumber"].ToString() + " &edition = " + siteUrl["edition"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
  80 +
  81 + ArrayList supportMailList = UserUtility.GetSupportMailList();
  82 + string mailSubject = AIAConstants.SQL_CONNECTION_ERROR_MAIL_SUBJECT;
  83 + string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace;
  84 + UserUtility.SendEmailForException(0, supportMailList, "", mailSubject, mailBody,true,siteUrl);
  85 +
  86 + return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.SQL_CONNECTION_ERROR) };
  87 + }
  88 + catch (Exception e)
  89 + {
  90 +
  91 + logger.Fatal("Exception occured for loginId =" + siteUrl["siteIP"].ToString() + " and siteUrl= " + siteUrl["siteIP"].ToString() + " & accountNumber = " + siteUrl["accountNumber"].ToString() + " &edition = " + siteUrl["edition"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
  92 + ArrayList supportMailList = UserUtility.GetSupportMailList();
  93 + string mailSubject = AIAConstants.EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT;
  94 + string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace;
  95 + UserUtility.SendEmailForException(0, supportMailList, "", mailSubject, mailBody, true, siteUrl);
  96 +
  97 + return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.EXCEPTION_OCCURED) };
  98 +
  99 + }
  100 + }
  101 +
  102 + // PUT api/client/5
  103 + public void Put(int id, [FromBody]string value)
  104 + {
  105 + }
  106 +
  107 + // DELETE api/client/5
  108 + public void Delete(int id)
  109 + {
  110 + }
  111 + }
  112 +}
400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
@@ -980,5 +980,151 @@ namespace AIAHTML5.API.Models @@ -980,5 +980,151 @@ namespace AIAHTML5.API.Models
980 // return 1; 980 // return 1;
981 981
982 //} 982 //}
  983 +
  984 + internal DataTable GetLicenseInfoBySiteUrl(string licenceAccount, int editionId)
  985 + {
  986 + logger.Debug(" inside GetLicenseIdBySiteUrl for UserId= " + editionId + ",licenceAccount = " + licenceAccount);
  987 +
  988 + // SiteUrl siteUrl = null;
  989 + DataTable dt = null;
  990 +
  991 + SqlConnection conn = new SqlConnection(dbConnectionString);
  992 + SqlCommand cmd = new SqlCommand();
  993 + cmd.Connection = conn;
  994 + cmd.CommandText = DBConstants.GET_LICENSEINFO_BY_SITE_URL;
  995 + cmd.CommandType = CommandType.StoredProcedure;
  996 + cmd.Parameters.AddWithValue("@sLicenseAccount", licenceAccount);
  997 + cmd.Parameters.AddWithValue("@iEditionId", editionId);
  998 + SqlDataAdapter da = new SqlDataAdapter();
  999 + da.SelectCommand = cmd;
  1000 + dt = new DataTable();
  1001 + da.Fill(dt);
  1002 +
  1003 + //if (dt != null && dt.Rows.Count > 0)
  1004 + //{
  1005 + // siteUrl = new SiteUrl();
  1006 + // foreach (DataRow dr in dt.Rows)
  1007 + // {
  1008 + // siteUrl.Id = Convert.ToInt32(dr["Id"]);
  1009 + // siteUrl.SiteIp = dr["SiteIp"].ToString();
  1010 + // siteUrl.SiteIpTo = dr["SiteIpTo"].ToString();
  1011 + // siteUrl.SiteMasterIpTo = dr["SiteMasterIpTo"].ToString();
  1012 + // siteUrl.IsMaster = Convert.ToInt32(dr["IsMaster"]);
  1013 +
  1014 + // }
  1015 + //}
  1016 +
  1017 + //return siteUrl;
  1018 + return dt;
  1019 + }
  1020 +
  1021 + internal DataTable GetLicenseBySiteId(int siteId)
  1022 + {
  1023 + logger.Debug(" inside GetLicenseBySiteId for siteId= " + siteId);
  1024 +
  1025 + // SiteUrl siteUrl = null;
  1026 + DataTable dt = null;
  1027 +
  1028 + SqlConnection conn = new SqlConnection(dbConnectionString);
  1029 + SqlCommand cmd = new SqlCommand();
  1030 + cmd.Connection = conn;
  1031 + cmd.CommandText = DBConstants.GET_LICENSE_BY_SITE_ID;
  1032 + cmd.CommandType = CommandType.StoredProcedure;
  1033 + cmd.Parameters.AddWithValue("@sSiteId", siteId);
  1034 +
  1035 + SqlDataAdapter da = new SqlDataAdapter();
  1036 + da.SelectCommand = cmd;
  1037 + dt = new DataTable();
  1038 + da.Fill(dt);
  1039 +
  1040 + //if (dt != null && dt.Rows.Count > 0)
  1041 + //{
  1042 + // siteUrl = new SiteUrl();
  1043 + // foreach (DataRow dr in dt.Rows)
  1044 + // {
  1045 + // siteUrl.Id = Convert.ToInt32(dr["Id"]);
  1046 + // siteUrl.SiteIp = dr["SiteIp"].ToString();
  1047 + // siteUrl.SiteIpTo = dr["SiteIpTo"].ToString();
  1048 + // siteUrl.SiteMasterIpTo = dr["SiteMasterIpTo"].ToString();
  1049 + // siteUrl.IsMaster = Convert.ToInt32(dr["IsMaster"]);
  1050 +
  1051 + // }
  1052 + //}
  1053 +
  1054 + //return siteUrl;
  1055 + return dt;
  1056 +
  1057 + }
  1058 + internal DataTable GetEditionsForModesty(int licenceId, int buildingLevelAcc)
  1059 + {
  1060 + logger.Debug(" inside GetEditionsForModesty for licenceId= " + licenceId);
  1061 +
  1062 + // SiteUrl siteUrl = null;
  1063 + DataTable dt = null;
  1064 +
  1065 + SqlConnection conn = new SqlConnection(dbConnectionString);
  1066 + SqlCommand cmd = new SqlCommand();
  1067 + cmd.Connection = conn;
  1068 + cmd.CommandText = DBConstants.GET_LICENSE_EDITIONS_FOR_MODESTY;
  1069 + cmd.CommandType = CommandType.StoredProcedure;
  1070 + cmd.Parameters.AddWithValue("@iLicenseId", licenceId);
  1071 + cmd.Parameters.AddWithValue("@iBuildingLevelId", buildingLevelAcc);
  1072 +
  1073 + SqlDataAdapter da = new SqlDataAdapter();
  1074 + da.SelectCommand = cmd;
  1075 + dt = new DataTable();
  1076 + da.Fill(dt);
  1077 +
  1078 + //if (dt != null && dt.Rows.Count > 0)
  1079 + //{
  1080 + // siteUrl = new SiteUrl();
  1081 + // foreach (DataRow dr in dt.Rows)
  1082 + // {
  1083 + // siteUrl.Id = Convert.ToInt32(dr["Id"]);
  1084 + // siteUrl.SiteIp = dr["SiteIp"].ToString();
  1085 + // siteUrl.SiteIpTo = dr["SiteIpTo"].ToString();
  1086 + // siteUrl.SiteMasterIpTo = dr["SiteMasterIpTo"].ToString();
  1087 + // siteUrl.IsMaster = Convert.ToInt32(dr["IsMaster"]);
  1088 +
  1089 + // }
  1090 + //}
  1091 +
  1092 + //return siteUrl;
  1093 + return dt;
  1094 + }
  1095 +
  1096 + internal Hashtable GetEditionFeatures(byte editionId)
  1097 + {
  1098 + Hashtable objFeatures = new Hashtable();
  1099 +
  1100 + DataTable dt = null;
  1101 +
  1102 + SqlConnection conn = new SqlConnection(dbConnectionString);
  1103 + SqlCommand cmd = new SqlCommand();
  1104 + cmd.Connection = conn;
  1105 + cmd.CommandText = DBConstants.GET_PRODUCT_FEATURES;
  1106 + cmd.CommandType = CommandType.StoredProcedure;
  1107 + cmd.Parameters.AddWithValue("@EditionId", editionId);
  1108 +
  1109 + SqlDataAdapter da = new SqlDataAdapter();
  1110 + da.SelectCommand = cmd;
  1111 + dt = new DataTable();
  1112 + da.Fill(dt);
  1113 +
  1114 + if (dt != null && dt.Rows.Count > 0)
  1115 + {
  1116 + foreach (DataRow dr in dt.Rows)
  1117 + {
  1118 + if (Convert.ToBoolean(dr["IsActive"]))
  1119 + {
  1120 + objFeatures.Add(dr["Id"], dr["Title"]);
  1121 + }
  1122 +
  1123 +
  1124 + }
  1125 + }
  1126 +
  1127 + return objFeatures;
  1128 + }
983 } 1129 }
984 } 1130 }
985 \ No newline at end of file 1131 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Models/IPValidator.cs 0 → 100644
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Linq;
  4 +using System.Text.RegularExpressions;
  5 +using System.Web;
  6 +
  7 +namespace AIAHTML5.API.Models
  8 +{
  9 + public class IPValidator
  10 + {
  11 + public static Double ChangeIpToDouble(String ipVal)
  12 + {
  13 + String[] resultArray = new String[20];
  14 + //Array resultArray ;
  15 + String n = ipVal;
  16 + String[] array = n.Split('.');
  17 + for (int i = 0; i < array.Length; i++)
  18 + {
  19 + if (array[i].Length == 1)
  20 + {
  21 + array[i] = "00" + array[i];
  22 + resultArray[i] = (array[i]);
  23 + }
  24 + else if (array[i].Length == 2)
  25 + {
  26 + array[i] = "0" + array[i];
  27 + resultArray[i] = (array[i]);
  28 + }
  29 + else
  30 + {
  31 + array[i] = array[i];
  32 + resultArray[i] = (array[i]);
  33 + }
  34 + }
  35 +
  36 + //String theContent = resultArray.ToString();
  37 + String theContent = "";
  38 +
  39 + for (int i = 0; i <= resultArray.Length - 1; i++)
  40 + {
  41 + if (!String.IsNullOrEmpty(resultArray[i]))
  42 + theContent += resultArray[i];
  43 + }
  44 + theContent = (theContent == "" ? "0" : theContent);
  45 +
  46 + return Convert.ToDouble(theContent);
  47 + //return theContent;
  48 + }
  49 +
  50 +
  51 + public static bool ValidateIP(String strSiteIp, String strSiteIPTo, String strSiteMasterIPTo, String strIPToValidate, int intIsMaster)
  52 + {
  53 + Double dblSiteIP = 0;
  54 + Double dblSiteIPTo = 0;
  55 + Double dblSiteMIPTo = 0;
  56 + Double dblIPToValidate = 0;
  57 + bool boolReturn = false;
  58 +
  59 + try
  60 + {
  61 + // Convert all IP to double values
  62 + dblSiteIP = ChangeIpToDouble(((strSiteIp == "" || IsNumericIP(strSiteIp) == false) ? "0" : strSiteIp));
  63 + dblSiteIPTo = ChangeIpToDouble(((strSiteIPTo == "" || IsNumericIP(strSiteIPTo) == false) ? "0" : strSiteIPTo));
  64 + dblSiteMIPTo = ChangeIpToDouble(((strSiteMasterIPTo == "" || IsNumericIP(strSiteMasterIPTo) == false) ? "0" : strSiteMasterIPTo));
  65 + dblIPToValidate = ChangeIpToDouble(((strIPToValidate == "" || IsNumericIP(strIPToValidate) == false) ? "0" : strIPToValidate));
  66 +
  67 + if (intIsMaster > 0)
  68 + {
  69 + if (dblSiteIP == dblIPToValidate)
  70 + boolReturn = true;
  71 +
  72 + if (dblSiteIPTo > 0 && dblSiteMIPTo > 0)
  73 + {
  74 + if (isBetween(dblIPToValidate, dblSiteIPTo, dblSiteMIPTo) == true)
  75 + {
  76 + boolReturn = true;
  77 + }
  78 + }
  79 + else if (dblSiteIPTo > 0)
  80 + {
  81 + if (dblSiteIPTo == dblIPToValidate)
  82 + boolReturn = true;
  83 + }
  84 + else if (dblSiteMIPTo > 0)
  85 + {
  86 + if (dblSiteMIPTo == dblIPToValidate)
  87 + boolReturn = true;
  88 + }
  89 + }
  90 + else
  91 + {
  92 + if (dblSiteIP > 0 && dblSiteIPTo > 0)
  93 + {
  94 + if (isBetween(dblIPToValidate, dblSiteIP, dblSiteIPTo) == true)
  95 + {
  96 + boolReturn = true;
  97 + }
  98 + }
  99 + else if (dblSiteIP > 0)
  100 + {
  101 + if (dblSiteIP == dblIPToValidate)
  102 + boolReturn = true;
  103 + }
  104 + else if (dblSiteIPTo > 0)
  105 + {
  106 + if (dblSiteIPTo == dblIPToValidate)
  107 + boolReturn = true;
  108 + }
  109 + }
  110 +
  111 + return boolReturn;
  112 + }
  113 + catch (Exception objExp)
  114 + {
  115 + return false;
  116 + }
  117 + }
  118 +
  119 + public static String FormatURLToIP(String strURL)
  120 + {
  121 + strURL = strURL.Replace("www.", "");
  122 + strURL = strURL.Replace("http://", "");
  123 + strURL = strURL.Replace("https://", "");
  124 + strURL = strURL.Replace("/", "");
  125 +
  126 + if (strURL.IndexOf(":") != -1)
  127 + {
  128 + char[] delimiters = new char[] { ':' };
  129 + string[] parts = strURL.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
  130 + strURL = parts[0];
  131 + }
  132 +
  133 + return strURL;
  134 + }
  135 +
  136 + /// <summary>
  137 + ///
  138 + /// </summary>
  139 + /// <param name="iNum"></param>
  140 + /// <param name="iFrom"></param>
  141 + /// <param name="iTo"></param>
  142 + /// <returns></returns>
  143 + private static bool isBetween(Double iNum, Double iFrom, Double iTo)
  144 + {
  145 + if (iNum == 0)
  146 + return false;
  147 +
  148 + if (iNum >= iFrom && iNum <= iTo)
  149 + {
  150 + return true;
  151 + }
  152 + return false;
  153 + }
  154 +
  155 + /// <summary>
  156 + ///
  157 + /// </summary>
  158 + /// <param name="text"></param>
  159 + /// <returns></returns>
  160 + public static bool IsNumericIP(string text)
  161 + {
  162 + //Regex objRegex = new Regex(@"^[-+]?[0-9]*\.?[0-9]+$");
  163 + Regex objRegex = new Regex(@"^[-+]?[0-9]*\.?[0-9]+$*\.?[0-9]+$*\.?[0-9]+$*\.?[0-9]+$");
  164 +
  165 + return objRegex.IsMatch(text);
  166 + }
  167 + }
  168 +}
0 \ No newline at end of file 169 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Models/User.cs
@@ -14,6 +14,11 @@ namespace AIAHTML5.API.Models @@ -14,6 +14,11 @@ namespace AIAHTML5.API.Models
14 public string EmailId { get; set; } 14 public string EmailId { get; set; }
15 public string LoginId { get; set; } 15 public string LoginId { get; set; }
16 public string Password { get; set; } 16 public string Password { get; set; }
  17 + public string AccountNumber { get; set; }
  18 + public byte LicenseTypeId { get; set; }
  19 + public bool Modesty { get; set; }
  20 + public bool ModestyMode { get; set; }
  21 + public Hashtable objEditionFeatures { get; set; }
17 public int? SecurityQuestionId { get; set; } 22 public int? SecurityQuestionId { get; set; }
18 public string SecurityAnswer { get; set; } 23 public string SecurityAnswer { get; set; }
19 public int? CreatorId { get; set; } 24 public int? CreatorId { get; set; }
@@ -49,6 +54,8 @@ namespace AIAHTML5.API.Models @@ -49,6 +54,8 @@ namespace AIAHTML5.API.Models
49 public const string RESELLER = "Reseller"; 54 public const string RESELLER = "Reseller";
50 public const string TEST_ACCOUNT = "Test Account"; 55 public const string TEST_ACCOUNT = "Test Account";
51 public const string SITE_USER = "Site User"; 56 public const string SITE_USER = "Site User";
  57 +
  58 +
52 } 59 }
53 60
54 public enum UserType 61 public enum UserType
@@ -113,4 +120,18 @@ namespace AIAHTML5.API.Models @@ -113,4 +120,18 @@ namespace AIAHTML5.API.Models
113 public string AccountNumber { get; set; } 120 public string AccountNumber { get; set; }
114 public DateTime LoginTime { get; set; } 121 public DateTime LoginTime { get; set; }
115 } 122 }
  123 +
  124 + public class SiteUrl
  125 + {
  126 + public int Id { get; set; }
  127 + public string SiteIp { get; set; }
  128 + public string SiteIpTo { get; set; }
  129 + public string SiteMasterIpTo { get; set; }
  130 + public int IsMaster { get; set; }
  131 +
  132 +
  133 +
  134 +
  135 + }
  136 +
116 } 137 }
117 \ No newline at end of file 138 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs
@@ -16,6 +16,7 @@ using System.Configuration; @@ -16,6 +16,7 @@ using System.Configuration;
16 using System.Collections; 16 using System.Collections;
17 using System.Data; 17 using System.Data;
18 using System.Reflection; 18 using System.Reflection;
  19 +using Newtonsoft.Json.Linq;
19 20
20 namespace AIAHTML5.API.Models 21 namespace AIAHTML5.API.Models
21 { 22 {
@@ -216,10 +217,10 @@ namespace AIAHTML5.API.Models @@ -216,10 +217,10 @@ namespace AIAHTML5.API.Models
216 } 217 }
217 } 218 }
218 219
219 - public static bool SendEmailForException(int userid, ArrayList mailToList, string sender, string mailSubject = "", string mailBody = "") 220 + public static bool SendEmailForException(int userid, ArrayList mailToList, string sender, string mailSubject = "", string mailBody = "", bool isMailForClentSite=false, JObject info=null)
220 { 221 {
221 ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); 222 ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
222 - logger.Debug("Inside SendEmail with userid =" + userid); 223 + // logger.Debug("Inside SendEmail with userid =" + userid);
223 224
224 try 225 try
225 { 226 {
@@ -235,8 +236,14 @@ namespace AIAHTML5.API.Models @@ -235,8 +236,14 @@ namespace AIAHTML5.API.Models
235 lstToAddress.Add(email); 236 lstToAddress.Add(email);
236 } 237 }
237 238
238 - emailMessage = "Unable to process request for userid: " + userid;  
239 - 239 + if (isMailForClentSite && info!=null)
  240 + {
  241 + emailMessage = "Unable to process request for siteUrl =" + info["siteIP"].ToString() + " and siteIP= " + info["siteIP"].ToString() + " & accountNumber = " + info["accountNumber"].ToString() + " &edition = " + info["edition"].ToString() ;
  242 + }
  243 + else
  244 + {
  245 + emailMessage = "Unable to process request for userid: " + userid;
  246 + }
240 247
241 248
242 if (string.IsNullOrEmpty(sender)) 249 if (string.IsNullOrEmpty(sender))
@@ -264,7 +271,13 @@ namespace AIAHTML5.API.Models @@ -264,7 +271,13 @@ namespace AIAHTML5.API.Models
264 return true; 271 return true;
265 } 272 }
266 catch (Exception ex) 273 catch (Exception ex)
267 - { 274 + {
  275 + if (isMailForClentSite){
  276 + logger.Fatal("exception in SendEmail for siteUrl =" + info["siteIP"].ToString()+ ". msg= " + ex.Message + ", stacktrace= " + ex.StackTrace);
  277 +
  278 + }
  279 +
  280 + else
268 logger.Fatal("exception in SendEmail for userid"+userid+ ". msg= " + ex.Message + ", stacktrace= " + ex.StackTrace); 281 logger.Fatal("exception in SendEmail for userid"+userid+ ". msg= " + ex.Message + ", stacktrace= " + ex.StackTrace);
269 return false; 282 return false;
270 } 283 }
400-SOURCECODE/AIAHTML5.API/Models/Users.cs
@@ -11,7 +11,9 @@ using AIAHTML5.API.Models; @@ -11,7 +11,9 @@ using AIAHTML5.API.Models;
11 using Newtonsoft.Json; 11 using Newtonsoft.Json;
12 using System.Collections; 12 using System.Collections;
13 using System.Data.SqlClient; 13 using System.Data.SqlClient;
14 - 14 +using System.Net;
  15 +using System.Data;
  16 +using AIAHTML5.API.Constants;
15 namespace AIAHTML5.API.Models 17 namespace AIAHTML5.API.Models
16 { 18 {
17 public class Users 19 public class Users
@@ -22,22 +24,22 @@ namespace AIAHTML5.API.Models @@ -22,22 +24,22 @@ namespace AIAHTML5.API.Models
22 logger.Debug("inside AuthenticateUser for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString()); 24 logger.Debug("inside AuthenticateUser for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString());
23 dynamic userDetails = null; 25 dynamic userDetails = null;
24 26
25 -  
26 - User user = DBModel.GetUserDetailsByLoginId(credentials["username"].ToString());  
27 - //string userDetails = DBModel.GetUserDetailsByLoginId2(credentials["username"].ToString());  
28 27
29 - if (user != null)  
30 - {  
31 - logger.Debug("userDetails.loginId= " + user.LoginId); // .loginId); 28 + User user = DBModel.GetUserDetailsByLoginId(credentials["username"].ToString());
  29 + //string userDetails = DBModel.GetUserDetailsByLoginId2(credentials["username"].ToString());
  30 +
  31 + if (user != null)
  32 + {
  33 + logger.Debug("userDetails.loginId= " + user.LoginId); // .loginId);
  34 +
  35 + userDetails = JsonConvert.SerializeObject(user);
  36 + }
  37 + else
  38 + {
  39 + userDetails = AIAConstants.USER_NOT_FOUND;
  40 + }
32 41
33 - userDetails = JsonConvert.SerializeObject(user);  
34 - }  
35 - else  
36 - {  
37 - userDetails = AIAConstants.USER_NOT_FOUND;  
38 - }  
39 42
40 -  
41 return userDetails; 43 return userDetails;
42 } 44 }
43 45
@@ -45,32 +47,32 @@ namespace AIAHTML5.API.Models @@ -45,32 +47,32 @@ namespace AIAHTML5.API.Models
45 { 47 {
46 logger.Debug(" inside GetUserByEmail for emailId = " + userInfo["emailId"]); 48 logger.Debug(" inside GetUserByEmail for emailId = " + userInfo["emailId"]);
47 49
48 -  
49 - User objUser = DBModel.GetUserDetailsByEmailId(userInfo["emailId"].ToString());  
50 50
51 - //dynamic userDetails; 51 + User objUser = DBModel.GetUserDetailsByEmailId(userInfo["emailId"].ToString());
  52 +
  53 + //dynamic userDetails;
  54 +
  55 + if (objUser != null)
  56 + {
  57 + logger.Debug("userDetails.loginId= " + objUser.LoginId);
  58 + //return userDetails = JsonConvert.SerializeObject(objUser);
  59 + return objUser;
  60 + }
  61 + else
  62 + {
  63 + return AIAConstants.USER_NOT_FOUND;
  64 + }
52 65
53 - if (objUser!= null)  
54 - {  
55 - logger.Debug("userDetails.loginId= " + objUser.LoginId);  
56 - //return userDetails = JsonConvert.SerializeObject(objUser);  
57 - return objUser;  
58 - }  
59 - else  
60 - {  
61 - return AIAConstants.USER_NOT_FOUND;  
62 - }  
63 -  
64 66
65 } 67 }
66 68
67 internal static dynamic UpdatePassword(Newtonsoft.Json.Linq.JObject userInfo, string sLoginId, string sEmailId) 69 internal static dynamic UpdatePassword(Newtonsoft.Json.Linq.JObject userInfo, string sLoginId, string sEmailId)
68 { 70 {
69 -  
70 - int result = DBModel.UpdateUserPassword(userInfo, sLoginId, sEmailId);  
71 71
72 - return result;  
73 - 72 + int result = DBModel.UpdateUserPassword(userInfo, sLoginId, sEmailId);
  73 +
  74 + return result;
  75 +
74 } 76 }
75 77
76 internal static dynamic UpdateLicenseTerm(Newtonsoft.Json.Linq.JObject userLicenseInfo) 78 internal static dynamic UpdateLicenseTerm(Newtonsoft.Json.Linq.JObject userLicenseInfo)
@@ -83,13 +85,13 @@ namespace AIAHTML5.API.Models @@ -83,13 +85,13 @@ namespace AIAHTML5.API.Models
83 85
84 userInfo.Add("accountNumber", accountNumber); 86 userInfo.Add("accountNumber", accountNumber);
85 87
86 -  
87 - result = DBModel.UpdateLicenseTermStatus(accountNumber);  
88 88
89 - if (result < 0)  
90 - {  
91 - logger.Fatal("Unable to update LicenseTermAccepted status for AccountNumber =" + accountNumber);  
92 - } 89 + result = DBModel.UpdateLicenseTermStatus(accountNumber);
  90 +
  91 + if (result < 0)
  92 + {
  93 + logger.Fatal("Unable to update LicenseTermAccepted status for AccountNumber =" + accountNumber);
  94 + }
93 95
94 return result; 96 return result;
95 } 97 }
@@ -106,10 +108,10 @@ namespace AIAHTML5.API.Models @@ -106,10 +108,10 @@ namespace AIAHTML5.API.Models
106 logger.Debug("inside getUserDetails for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString()); 108 logger.Debug("inside getUserDetails for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString());
107 User userDetails = null; 109 User userDetails = null;
108 110
109 -  
110 - userDetails = DBModel.GetUserDetailsByLoginId(credentials["username"].ToString());  
111 111
112 - return userDetails; 112 + userDetails = DBModel.GetUserDetailsByLoginId(credentials["username"].ToString());
  113 +
  114 + return userDetails;
113 } 115 }
114 116
115 internal static void getLicenseIdForThisUser(int userId, out int licenseId, out int editionId) 117 internal static void getLicenseIdForThisUser(int userId, out int licenseId, out int editionId)
@@ -120,18 +122,18 @@ namespace AIAHTML5.API.Models @@ -120,18 +122,18 @@ namespace AIAHTML5.API.Models
120 licenseId = 0; 122 licenseId = 0;
121 editionId = 0; 123 editionId = 0;
122 124
123 -  
124 125
125 - DBModel objModel = new DBModel();  
126 - Hashtable licenseEditionHash = objModel.GetLicenseDetailByUserId(userId);  
127 126
128 - if (licenseEditionHash.ContainsKey(AIAConstants.LICENSE_KEY_ID))  
129 - licenseId = Convert.ToInt32(licenseEditionHash[AIAConstants.LICENSE_KEY_ID]); 127 + DBModel objModel = new DBModel();
  128 + Hashtable licenseEditionHash = objModel.GetLicenseDetailByUserId(userId);
  129 +
  130 + if (licenseEditionHash.ContainsKey(AIAConstants.LICENSE_KEY_ID))
  131 + licenseId = Convert.ToInt32(licenseEditionHash[AIAConstants.LICENSE_KEY_ID]);
  132 +
  133 + if (licenseEditionHash.ContainsKey(AIAConstants.EDITION_KEY_ID))
  134 + editionId = Convert.ToInt32(licenseEditionHash[AIAConstants.EDITION_KEY_ID]);
  135 +
130 136
131 - if (licenseEditionHash.ContainsKey(AIAConstants.EDITION_KEY_ID))  
132 - editionId = Convert.ToInt32(licenseEditionHash[AIAConstants.EDITION_KEY_ID]);  
133 -  
134 -  
135 } 137 }
136 138
137 internal static int insertLoginDetails(int userId) 139 internal static int insertLoginDetails(int userId)
@@ -139,12 +141,12 @@ namespace AIAHTML5.API.Models @@ -139,12 +141,12 @@ namespace AIAHTML5.API.Models
139 logger.Debug("inside insertLoginDetails for UserId =" + userId); 141 logger.Debug("inside insertLoginDetails for UserId =" + userId);
140 142
141 int result = 0; 143 int result = 0;
142 -  
143 - DBModel objModel = new DBModel();  
144 144
145 - result = objModel.InsertLoginDetails(userId);  
146 -  
147 - return result; 145 + DBModel objModel = new DBModel();
  146 +
  147 + result = objModel.InsertLoginDetails(userId);
  148 +
  149 + return result;
148 } 150 }
149 151
150 internal static bool isUSerActive(User user) 152 internal static bool isUSerActive(User user)
@@ -160,7 +162,7 @@ namespace AIAHTML5.API.Models @@ -160,7 +162,7 @@ namespace AIAHTML5.API.Models
160 expirationDate = string.Empty; 162 expirationDate = string.Empty;
161 bool isLicenseExpired = false; 163 bool isLicenseExpired = false;
162 164
163 - if (subscriptionDetail!= null) 165 + if (subscriptionDetail != null)
164 { 166 {
165 DateTime? subscriptionValidThrough = subscriptionDetail.SubscriptionValidThrough; 167 DateTime? subscriptionValidThrough = subscriptionDetail.SubscriptionValidThrough;
166 if (subscriptionValidThrough != null && subscriptionValidThrough.Value.Date >= DateTime.Now.Date) 168 if (subscriptionValidThrough != null && subscriptionValidThrough.Value.Date >= DateTime.Now.Date)
@@ -171,7 +173,7 @@ namespace AIAHTML5.API.Models @@ -171,7 +173,7 @@ namespace AIAHTML5.API.Models
171 { 173 {
172 isLicenseExpired = true; 174 isLicenseExpired = true;
173 expirationDate = subscriptionDetail.SubscriptionValidThrough.Value.Date.ToString("MM/dd/yyyy").ToString(); 175 expirationDate = subscriptionDetail.SubscriptionValidThrough.Value.Date.ToString("MM/dd/yyyy").ToString();
174 - } 176 + }
175 } 177 }
176 return isLicenseExpired; 178 return isLicenseExpired;
177 } 179 }
@@ -182,13 +184,13 @@ namespace AIAHTML5.API.Models @@ -182,13 +184,13 @@ namespace AIAHTML5.API.Models
182 184
183 ArrayList licensedModulesList = new ArrayList(); 185 ArrayList licensedModulesList = new ArrayList();
184 186
185 -  
186 187
187 - DBModel objModel = new DBModel();  
188 - licensedModulesList = objModel.GetUserModulesByLicenseId(licenseId);  
189 -  
190 188
191 - return licensedModulesList; 189 + DBModel objModel = new DBModel();
  190 + licensedModulesList = objModel.GetUserModulesByLicenseId(licenseId);
  191 +
  192 +
  193 + return licensedModulesList;
192 } 194 }
193 195
194 internal static int deletePastWrongAttempts(int userId) 196 internal static int deletePastWrongAttempts(int userId)
@@ -197,10 +199,10 @@ namespace AIAHTML5.API.Models @@ -197,10 +199,10 @@ namespace AIAHTML5.API.Models
197 199
198 int result = 0; 200 int result = 0;
199 201
200 -  
201 - DBModel objModel = new DBModel();  
202 - result = objModel.DeleteIncorrectLoginAttempts(userId);  
203 - return result; 202 +
  203 + DBModel objModel = new DBModel();
  204 + result = objModel.DeleteIncorrectLoginAttempts(userId);
  205 + return result;
204 } 206 }
205 207
206 internal static int checkNoOfWrongAttempts(int userId) 208 internal static int checkNoOfWrongAttempts(int userId)
@@ -209,10 +211,10 @@ namespace AIAHTML5.API.Models @@ -209,10 +211,10 @@ namespace AIAHTML5.API.Models
209 211
210 int incorrectLoginAttemptCount = 0; 212 int incorrectLoginAttemptCount = 0;
211 213
212 -  
213 - DBModel objModel = new DBModel();  
214 - incorrectLoginAttemptCount = objModel.GetIncorrectLoginAttempts(userId);  
215 - return incorrectLoginAttemptCount; 214 +
  215 + DBModel objModel = new DBModel();
  216 + incorrectLoginAttemptCount = objModel.GetIncorrectLoginAttempts(userId);
  217 + return incorrectLoginAttemptCount;
216 } 218 }
217 219
218 internal static int saveWrongAttemptOfUser(int userId, int previousIncorrectLoginAttempts) 220 internal static int saveWrongAttemptOfUser(int userId, int previousIncorrectLoginAttempts)
@@ -220,18 +222,18 @@ namespace AIAHTML5.API.Models @@ -220,18 +222,18 @@ namespace AIAHTML5.API.Models
220 logger.Debug("inside saveWrongAttemptofUser for UserId =" + userId); 222 logger.Debug("inside saveWrongAttemptofUser for UserId =" + userId);
221 int result = 0; 223 int result = 0;
222 224
223 -  
224 - DBModel objModel = new DBModel();  
225 225
226 - if (previousIncorrectLoginAttempts < 1)  
227 - {  
228 - result = objModel.InsertIncorrectLoginAttempts(userId);  
229 - }  
230 - else  
231 - {  
232 - result = objModel.UpdateIncorrectLoginAttempts(userId);  
233 - }  
234 - 226 + DBModel objModel = new DBModel();
  227 +
  228 + if (previousIncorrectLoginAttempts < 1)
  229 + {
  230 + result = objModel.InsertIncorrectLoginAttempts(userId);
  231 + }
  232 + else
  233 + {
  234 + result = objModel.UpdateIncorrectLoginAttempts(userId);
  235 + }
  236 +
235 237
236 return result; 238 return result;
237 } 239 }
@@ -241,16 +243,16 @@ namespace AIAHTML5.API.Models @@ -241,16 +243,16 @@ namespace AIAHTML5.API.Models
241 logger.Debug("inside isLicenseActive for LicenseId =" + licenseId); 243 logger.Debug("inside isLicenseActive for LicenseId =" + licenseId);
242 bool result = false; 244 bool result = false;
243 245
244 - DBModel objModel = new DBModel();  
245 - License userLicense = objModel.GetLicenseDetailsByLicenseId(licenseId); 246 + DBModel objModel = new DBModel();
  247 + License userLicense = objModel.GetLicenseDetailsByLicenseId(licenseId);
246 248
247 249
248 - if (userLicense.IsActive)  
249 - result = true;  
250 - else  
251 - result = false;  
252 -  
253 - return result; 250 + if (userLicense.IsActive)
  251 + result = true;
  252 + else
  253 + result = false;
  254 +
  255 + return result;
254 } 256 }
255 257
256 internal static License getLicenseDetails(int licenseId) 258 internal static License getLicenseDetails(int licenseId)
@@ -259,11 +261,11 @@ namespace AIAHTML5.API.Models @@ -259,11 +261,11 @@ namespace AIAHTML5.API.Models
259 261
260 License userLicense = null; 262 License userLicense = null;
261 263
262 -  
263 - DBModel objModel = new DBModel();  
264 - userLicense = objModel.GetLicenseDetailsByLicenseId(licenseId);  
265 -  
266 - return userLicense; 264 +
  265 + DBModel objModel = new DBModel();
  266 + userLicense = objModel.GetLicenseDetailsByLicenseId(licenseId);
  267 +
  268 + return userLicense;
267 } 269 }
268 270
269 internal static LicenseSubscriptionDetails getLicenseSubscriptionDetails(int licenseId) 271 internal static LicenseSubscriptionDetails getLicenseSubscriptionDetails(int licenseId)
@@ -272,19 +274,19 @@ namespace AIAHTML5.API.Models @@ -272,19 +274,19 @@ namespace AIAHTML5.API.Models
272 274
273 LicenseSubscriptionDetails userSubscriptionDetail = null; 275 LicenseSubscriptionDetails userSubscriptionDetail = null;
274 276
275 -  
276 - DBModel objModel = new DBModel();  
277 - userSubscriptionDetail = objModel.GetLicenseSubscriptionDetailsByLicenseId(licenseId);  
278 - 277 +
  278 + DBModel objModel = new DBModel();
  279 + userSubscriptionDetail = objModel.GetLicenseSubscriptionDetailsByLicenseId(licenseId);
  280 +
279 return userSubscriptionDetail; 281 return userSubscriptionDetail;
280 } 282 }
281 283
282 internal static void isCredentialCorrect(Newtonsoft.Json.Linq.JObject credentials, User userInfo, out bool isCorrectLoginId, out bool isCorrectPassword) 284 internal static void isCredentialCorrect(Newtonsoft.Json.Linq.JObject credentials, User userInfo, out bool isCorrectLoginId, out bool isCorrectPassword)
283 { 285 {
284 isCorrectLoginId = false; 286 isCorrectLoginId = false;
285 - isCorrectPassword = false; 287 + isCorrectPassword = false;
286 288
287 - if (userInfo.Id> 0) 289 + if (userInfo.Id > 0)
288 { 290 {
289 if (string.Equals(credentials["username"].ToString().ToUpper(), userInfo.LoginId.ToUpper())) 291 if (string.Equals(credentials["username"].ToString().ToUpper(), userInfo.LoginId.ToUpper()))
290 isCorrectLoginId = true; 292 isCorrectLoginId = true;
@@ -302,10 +304,10 @@ namespace AIAHTML5.API.Models @@ -302,10 +304,10 @@ namespace AIAHTML5.API.Models
302 304
303 int result = 0; 305 int result = 0;
304 306
305 -  
306 - DBModel objModel = new DBModel();  
307 - result = objModel.InsertUserLoginLog(accountNumber, failureId, null, edition, null);  
308 - 307 +
  308 + DBModel objModel = new DBModel();
  309 + result = objModel.InsertUserLoginLog(accountNumber, failureId, null, edition, null);
  310 +
309 return result; 311 return result;
310 } 312 }
311 313
@@ -316,21 +318,21 @@ namespace AIAHTML5.API.Models @@ -316,21 +318,21 @@ namespace AIAHTML5.API.Models
316 318
317 ArrayList arrTermsOfService = new ArrayList(); 319 ArrayList arrTermsOfService = new ArrayList();
318 320
319 - DBModel objModel = new DBModel();  
320 - arrTermsOfService = DBModel.GetTermsAndConditions();  
321 - 321 + DBModel objModel = new DBModel();
  322 + arrTermsOfService = DBModel.GetTermsAndConditions();
  323 +
322 return arrTermsOfService; 324 return arrTermsOfService;
323 } 325 }
324 326
325 internal static ArrayList getAllModulesList() 327 internal static ArrayList getAllModulesList()
326 { 328 {
327 logger.Debug("inside getAllModulesList"); 329 logger.Debug("inside getAllModulesList");
328 - ArrayList modulesList = new ArrayList (); 330 + ArrayList modulesList = new ArrayList();
  331 +
  332 +
  333 + DBModel objModel = new DBModel();
  334 + modulesList = objModel.GetAllModules();
329 335
330 -  
331 - DBModel objModel = new DBModel();  
332 - modulesList = objModel.GetAllModules();  
333 -  
334 return modulesList; 336 return modulesList;
335 } 337 }
336 338
@@ -340,19 +342,261 @@ namespace AIAHTML5.API.Models @@ -340,19 +342,261 @@ namespace AIAHTML5.API.Models
340 bool isUserBlocked = false; 342 bool isUserBlocked = false;
341 blockTime = new DateTime(); 343 blockTime = new DateTime();
342 344
343 -  
344 - DBModel objModel = new DBModel();  
345 - BlockedUser blockedUser = objModel.GetUserBlockedStatusByUserId(userId);  
346 345
347 - if (blockedUser!= null) 346 + DBModel objModel = new DBModel();
  347 + BlockedUser blockedUser = objModel.GetUserBlockedStatusByUserId(userId);
  348 +
  349 + if (blockedUser != null)
  350 + {
  351 + blockTime = blockedUser.LoginTime;
  352 + isUserBlocked = true;
  353 + }
  354 + else
  355 + isUserBlocked = false;
  356 +
  357 + return isUserBlocked;
  358 + }
  359 +
  360 +
  361 +
  362 + public static int ValidateLicenseSiteIP(string strLicenseSiteIP, string remoteIpAddress, string strAccountNumber, byte editionId)
  363 + {
  364 + if (strLicenseSiteIP == null)
  365 + strLicenseSiteIP = remoteIpAddress;
  366 +
  367 + int intReturn = 0;
  368 + DBModel objDBModel = new DBModel();
  369 + DataTable dtLicense = objDBModel.GetLicenseInfoBySiteUrl(strAccountNumber, (byte)editionId);
  370 +
  371 + if (dtLicense.Rows.Count > 0)
  372 + {
  373 + //strLicenseSiteIP
  374 + String strSiteIP = "";
  375 + String strSiteIPTo = "";
  376 + String strSiteMIPTo = "";
  377 +
  378 + IPAddress[] arrHostIP = new IPAddress[2];
  379 + try
348 { 380 {
349 - blockTime = blockedUser.LoginTime;  
350 - isUserBlocked = true; 381 + arrHostIP.SetValue(IPAddress.Parse(remoteIpAddress), 0);
  382 + arrHostIP.SetValue(IPAddress.Parse(strLicenseSiteIP), 1);
351 } 383 }
352 - else  
353 - isUserBlocked = false;  
354 -  
355 - return isUserBlocked; 384 + catch (Exception e)
  385 + {
  386 + //NOTE: if no domain name found we try to resolve by IP.
  387 + //arrHostIP.SetValue(Dns.GetHostAddresses(strLicenseSiteIP),1); //I SHould remove this feature it is useless
  388 + };
  389 +
  390 + // foreach (IPAddress address in arrHostIP)
  391 + foreach (IPAddress address in arrHostIP)
  392 + {
  393 + if (address == null)
  394 + continue;
  395 + String ipStr = address.ToString();
  396 + if (ipStr == "::1" || ipStr == "") continue;
  397 + foreach (DataRow objLicenseRow in dtLicense.Rows)
  398 + {
  399 + strSiteIP = (String.IsNullOrEmpty(objLicenseRow["SiteIp"].ToString()) ? "" : objLicenseRow["SiteIp"].ToString());
  400 + strSiteIPTo = (String.IsNullOrEmpty(objLicenseRow["SiteIPTo"].ToString()) ? "" : objLicenseRow["SiteIPTo"].ToString());
  401 + //if (String.IsNullOrEmpty(objLicenseRow.SiteIPTo) == false)
  402 + //strSiteIPTo = objLicenseRow.SiteIPTo;
  403 + strSiteMIPTo = (String.IsNullOrEmpty(objLicenseRow["SiteMasterIPTo"].ToString()) ? "" : objLicenseRow["SiteMasterIPTo"].ToString());
  404 + if (IPValidator.ValidateIP(strSiteIP.ToLower(), strSiteIPTo.ToLower(), strSiteMIPTo.ToLower(), ipStr.ToLower(), Convert.ToInt16(objLicenseRow["IsMaster"])) == true)
  405 + {
  406 + intReturn = Convert.ToInt32(objLicenseRow["Id"]);
  407 + return intReturn;
  408 + }
  409 + }
  410 + }
  411 +
  412 + if (IPValidator.IsNumericIP(strLicenseSiteIP) == false)
  413 + {
  414 + foreach (DataRow objLicenseRow in dtLicense.Rows)
  415 + {
  416 + strSiteIP = (String.IsNullOrEmpty(objLicenseRow["SiteIp"].ToString()) ? "" : objLicenseRow["SiteIp"].ToString());
  417 + // strSiteIPTo = (String.IsNullOrEmpty(objLicenseRow.SiteIPTo) ? "" : objLicenseRow.SiteIPTo);
  418 + if (String.IsNullOrEmpty(objLicenseRow["SiteIPTo"].ToString()) == false)
  419 + strSiteIPTo = objLicenseRow["SiteIPTo"].ToString();
  420 + strSiteMIPTo = (String.IsNullOrEmpty(objLicenseRow["SiteMasterIPTo"].ToString()) ? "" : objLicenseRow["SiteMasterIPTo"].ToString());
  421 + // if provided ip is not numeric, then compare directly with all the fields
  422 + if ((strLicenseSiteIP.ToLower() == strSiteIP.ToLower()) ||
  423 + (strLicenseSiteIP.ToLower() == IPValidator.FormatURLToIP(strSiteIP).ToLower()) ||
  424 + (strLicenseSiteIP.ToLower() == strSiteIPTo.ToLower()) ||
  425 + (strLicenseSiteIP.ToLower() == IPValidator.FormatURLToIP(strSiteIPTo).ToLower()) ||
  426 + (strLicenseSiteIP.ToLower() == strSiteMIPTo.ToLower()) ||
  427 + (strLicenseSiteIP.ToLower() == IPValidator.FormatURLToIP(strSiteMIPTo).ToLower()))
  428 + {
  429 + intReturn = Convert.ToInt32(objLicenseRow["Id"]);
  430 + return intReturn;
  431 + }
  432 + }
  433 + }
  434 + }
  435 + return intReturn;
  436 + }
  437 +
  438 + public static User ValidateSiteLogin(String strSiteIP, String strAcccountNumber, String strUrlReferer, string strEdition, int intSiteId)
  439 + {
  440 + Int32 intUserId = 0;
  441 + bool isExpired = false;
  442 + User userInfo = null;
  443 + //try {
  444 + Int16 intErrorID = ErrorHelper.E_NO_ERROR;
  445 + String strStatus = AIAConstants.STATUS_OK;
  446 +
  447 + int intLicenseId = 0;
  448 + int intEditionId = Convert.ToInt16(strEdition);
  449 +
  450 + DateTime dtLogDate = DateTime.Now;
  451 + //strSiteIP = (String)objRequest.GetData(AIAConstants.SITE_IP);
  452 + //strAcccountNumber = (String)objRequest.GetData(AIAConstants.ACCOUNT_NUMBER);
  453 + //intEditionId = Convert.ToInt16(objRequest.GetData(AIAConstants.EDITION_ID));
  454 + //strUrlReferer = (String)objRequest.GetData(AIAConstants.URL_REFERER);
  455 + //strEdition = (String)objRequest.GetData(AIAConstants.EDITION_ID);
  456 + //intSiteId = (Int32)objRequest.GetData(AIAConstants.SITE_ID);
  457 + //AdminDAL.AdminDal.GetLicenseBySiteIdDataTable dtLicense = new ADAM.AIA50.AdminDAL.AdminDal.GetLicenseBySiteIdDataTable();
  458 + if (string.IsNullOrEmpty(strAcccountNumber))
  459 + {
  460 + //----logAuthenticationTryForAccountNumber(strAcccountNumber, dtLogDate, ErrorHelper.ACCOUNT_NUMBER_NOT_NULL, strSiteIP, strEdition, strUrlReferer);
  461 + //intErrorID = ErrorHelper.E_ACCOUNT_NUMBER_NOT_NULL;
  462 + //strStatus = AIAConstants.STATUS_NOT_OK;
  463 +
  464 + userInfo.LoginFailureCauseId = ErrorHelper.E_ACCOUNT_NUMBER_NOT_NULL;
  465 + }
  466 + else if (string.IsNullOrEmpty(strEdition))
  467 + {
  468 + strEdition = "0";
  469 + //----logAuthenticationTryForAccountNumber(strAcccountNumber, dtLogDate, ErrorHelper.EDITION_ID_NOT_NULL, strSiteIP, strEdition, strUrlReferer);
  470 + //intErrorID = ErrorHelper.E_EDITION_ID_NOT_NULL;
  471 + //strStatus = AIAConstants.STATUS_NOT_OK;
  472 + userInfo.LoginFailureCauseId = ErrorHelper.E_EDITION_ID_NOT_NULL;
  473 +
  474 + }
  475 + else
  476 + {
  477 + DBModel objDBModel = new DBModel();
  478 + DataTable dtLicense = objDBModel.GetLicenseBySiteId(intSiteId);
  479 + if (dtLicense.Rows.Count > 0)
  480 + {
  481 + //foreach (DataRow licRow in dtLicense.Rows)
  482 + //{
  483 + DataRow licRow = dtLicense.Rows[0];
  484 + //isExpired = LicenseHelper.IsLicenseExpired(licRow["Id"]);
  485 + userInfo = new User();
  486 + userInfo.LicenseInfo = AIAHTML5.API.Models.Users.getLicenseDetails(Convert.ToInt32(licRow["Id"]));
  487 +
  488 + if (userInfo.LicenseInfo != null)
  489 + {
  490 + //05.3 get licenseSubscription details
  491 + userInfo.LicenseSubscriptions = AIAHTML5.API.Models.Users.getLicenseSubscriptionDetails( userInfo.LicenseInfo.Id);
  492 +
  493 + //05.4 check the License expiration irespective of either user is active or not because on AIA
  494 + //we shows the License expiration message for inactive users too
  495 +
  496 +
  497 + if (userInfo.LicenseSubscriptions != null)
  498 + {
  499 + DateTime? subscriptionValidThrough = userInfo.LicenseSubscriptions.SubscriptionValidThrough;
  500 + if (subscriptionValidThrough != null && subscriptionValidThrough.Value.Date >= DateTime.Now.Date)
  501 + {
  502 + isExpired = false;
  503 + }
  504 + else
  505 + {
  506 + isExpired = true;
  507 + }
  508 + }
  509 +
  510 +
  511 +
  512 + if (!isExpired && Convert.ToBoolean(licRow["IsActive"]) == true)
  513 + {
  514 + //User objUserContext = new User();
  515 + userInfo.Id = 0;
  516 + userInfo.FirstName = licRow["LicenseeFirstName"].ToString();
  517 + userInfo.LastName = licRow["LicenseeLastName"].ToString();
  518 + userInfo.UserTypeId = AIAConstants.SITE_USER;
  519 + if (licRow["EmailId"].ToString() != null)
  520 + {
  521 + userInfo.EmailId = licRow["EmailId"].ToString();
  522 + }
  523 + else
  524 + {
  525 + userInfo.EmailId = null;
  526 + }
  527 + userInfo.AccountNumber = strAcccountNumber;
  528 + userInfo.EditionId = (Byte)intEditionId;
  529 + userInfo.LicenseTypeId = (byte)licRow["LicenseTypeId"];
  530 + userInfo.LicenseId = Convert.ToInt32(licRow["Id"]);
  531 + userInfo.LoginId = "";
  532 + userInfo.Modesty = (bool)licRow["IsModesty"];
  533 + //Retreive ModestyMode
  534 + userInfo.ModestyMode = false;
  535 +
  536 + intLicenseId = Convert.ToInt32(licRow["Id"]);
  537 +
  538 +
  539 + DataTable dtblEditionForModesty = new DBModel().GetEditionsForModesty(userInfo.LicenseId, 0);
  540 + //This table result set should return always have 0 or 1 record if modesty mode is present.
  541 + foreach (DataRow drEditionForModesty in dtblEditionForModesty.Rows)
  542 + {
  543 + if ((bool)drEditionForModesty["IsModesty"])
  544 + {
  545 + userInfo.Modesty = true;
  546 + userInfo.ModestyMode = true;
  547 + }
  548 + }
  549 +
  550 + // get edition features details
  551 + userInfo.objEditionFeatures = objDBModel.GetEditionFeatures((Byte)intEditionId);
  552 +
  553 +
  554 +
  555 + if (intLicenseId > 0)
  556 + userInfo.Modules = getModuleListByLicenseId(intLicenseId);
  557 + else
  558 + userInfo.Modules = getAllModulesList();
  559 +
  560 + // objResponse.AddData(LoginConst.USER_CONTEXT, objUserContext);
  561 +
  562 +
  563 + // Hashtable arrModuleList = LicenseHelper.GetInstance().GetAllModuleByLicenseId(objLicenseRow.Id);
  564 + //if (arrModuleList[9].Equals(true)) {
  565 + // SessionManager.GetInstance().AddModSession("ModuleNameIP10", "IP10");
  566 + //}
  567 +
  568 + //logAuthenticationTryForAccountNumber(strAcccountNumber, dtLogDate, 0, strSiteIP, strEdition, strUrlReferer);
  569 + }
  570 + else
  571 + {
  572 + // logAuthenticationTryForAccountNumber(strAcccountNumber, dtLogDate, ErrorHelper.LICENSE_INACTIVE, strSiteIP, Convert.ToString(intEditionId), strUrlReferer);
  573 + // intErrorID = ErrorHelper.E_LICENCE_IS_INACTIVE;
  574 + // strStatus = AIAConstants.STATUS_NOT_OK;
  575 + userInfo.LoginFailureCauseId = ErrorHelper.LICENSE_INACTIVE;
  576 + }
  577 + }
  578 + else
  579 + {
  580 +
  581 + // intErrorID = ErrorHelper.E_EDITION_NOT_LINKED_WITH_SITE;
  582 + // strStatus = AIAConstants.STATUS_NOT_OK;
  583 + userInfo.LoginFailureCauseId = ErrorHelper.E_EDITION_NOT_LINKED_WITH_SITE;
  584 + }
  585 + //}
  586 + }
  587 + }
  588 + //objResponse.ErrorCode = intErrorID;
  589 + //objResponse.Status = strStatus;
  590 + //objResponse.ErrorDesc = ErrorHelper.GetInstance().GetErrorDescriptionHelper(intErrorID).ToString();
  591 + //} catch (Exception objExp) {
  592 + // objResponse.Status = GlobalConstant.STATUS_NOT_OK;
  593 + // objResponse.ErrorCode = GlobalConstant.RUN_TIME_EXCEPTION;
  594 + // objResponse.strErrorDesc = objExp.Message;
  595 + //}
  596 + //if (isExpired != null && (bool)isExpired["result"])
  597 + // objResponse.strErrorDesc = objResponse.strErrorDesc.Replace("{0}", (string)isExpired["date"]);
  598 + //return intUserId;
  599 + return userInfo;
356 } 600 }
357 } 601 }
358 } 602 }
359 \ No newline at end of file 603 \ No newline at end of file
400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
@@ -45202,7 +45202,8 @@ @@ -45202,7 +45202,8 @@
45202 <Content Include="content\scripts\js\custom\main.js" /> 45202 <Content Include="content\scripts\js\custom\main.js" />
45203 <Content Include="content\data\json\da\vocab\Swedish\cm_dat_vocabterm_3.json" /> 45203 <Content Include="content\data\json\da\vocab\Swedish\cm_dat_vocabterm_3.json" />
45204 <None Include="content\data\json\le\qz_dat_ca.json" /> 45204 <None Include="content\data\json\le\qz_dat_ca.json" />
45205 - <Content Include="index.html" /> 45205 + <Content Include="index.aspx" />
  45206 + <Content Include="index1.html" />
45206 <Content Include="libs\angular-drag-and-drop-lists.js" /> 45207 <Content Include="libs\angular-drag-and-drop-lists.js" />
45207 <Content Include="libs\angular-ui\css\slider.css" /> 45208 <Content Include="libs\angular-ui\css\slider.css" />
45208 <Content Include="libs\angular-ui\js\slider.js" /> 45209 <Content Include="libs\angular-ui\js\slider.js" />
@@ -45445,6 +45446,20 @@ @@ -45445,6 +45446,20 @@
45445 <HintPath>..\packages\log4net.2.0.7\lib\net45-full\log4net.dll</HintPath> 45446 <HintPath>..\packages\log4net.2.0.7\lib\net45-full\log4net.dll</HintPath>
45446 <Private>True</Private> 45447 <Private>True</Private>
45447 </Reference> 45448 </Reference>
  45449 + <Reference Include="System" />
  45450 + <Reference Include="System.Data" />
  45451 + <Reference Include="System.Drawing" />
  45452 + <Reference Include="System.Web" />
  45453 + <Reference Include="System.Xml" />
  45454 + </ItemGroup>
  45455 + <ItemGroup>
  45456 + <Compile Include="index.aspx.cs">
  45457 + <DependentUpon>index.aspx</DependentUpon>
  45458 + <SubType>ASPXCodeBehind</SubType>
  45459 + </Compile>
  45460 + <Compile Include="index.aspx.designer.cs">
  45461 + <DependentUpon>index.aspx</DependentUpon>
  45462 + </Compile>
45448 </ItemGroup> 45463 </ItemGroup>
45449 <PropertyGroup> 45464 <PropertyGroup>
45450 <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> 45465 <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
400-SOURCECODE/AIAHTML5.Web/Web.config
@@ -49,6 +49,7 @@ @@ -49,6 +49,7 @@
49 <defaultDocument enabled="true"> 49 <defaultDocument enabled="true">
50 <files> 50 <files>
51 <clear /> 51 <clear />
  52 + <add value="index.aspx" />
52 <add value="index.html" /> 53 <add value="index.html" />
53 <add value="login.html" /> 54 <add value="login.html" />
54 <add value="Default.asp" /> 55 <add value="Default.asp" />
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -92,6 +92,18 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A @@ -92,6 +92,18 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
92 userLicenseId: 0, 92 userLicenseId: 0,
93 licenseeAccountNumber: null 93 licenseeAccountNumber: null
94 }; 94 };
  95 +
  96 + $rootScope.siteUrlInfo = {
  97 + siteIP: null,
  98 + remoteIPAddress:null,
  99 + status: null,
  100 + accountNumber: null,
  101 + edition: null,
  102 + urlReferer: null,
  103 + calsCreds: null,
  104 + userId: null,
  105 + password:null
  106 + }
95 $rootScope.userData; 107 $rootScope.userData;
96 $rootScope.userModules; 108 $rootScope.userModules;
97 $rootScope.passwordMismatchMessage; 109 $rootScope.passwordMismatchMessage;
@@ -121,27 +133,32 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A @@ -121,27 +133,32 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
121 133
122 } 134 }
123 135
124 - 136 +
125 $rootScope.initializeAIA = function () { 137 $rootScope.initializeAIA = function () {
126 -  
127 - if (navigator.cookieEnabled) {  
128 -  
129 - $rootScope.isLoading = false; 138 + if (params != null && params != undefined && params!="") {
130 139
131 - var url = $location.url(); 140 + $scope.ValidateClientSiteUrl();
  141 + }
132 142
133 - //unblock user  
134 - if (url.indexOf('?unb:') != -1) { 143 + else {
  144 + if (navigator.cookieEnabled) {
135 145
136 - $rootScope.isVisibleLogin = true;  
137 - $rootScope.UnblockUser();  
138 - }  
139 - else if (url.indexOf('?em:') != -1) { 146 + $rootScope.isLoading = false;
140 147
141 - $rootScope.isVisibleLogin = false;  
142 - $rootScope.isVisibleResetPass = true;  
143 - }  
144 - else { 148 + var url = $location.url();
  149 +
  150 + //unblock user
  151 + if (url.indexOf('?unb:') != -1) {
  152 +
  153 + $rootScope.isVisibleLogin = true;
  154 + $rootScope.UnblockUser();
  155 + }
  156 + else if (url.indexOf('?em:') != -1) {
  157 +
  158 + $rootScope.isVisibleLogin = false;
  159 + $rootScope.isVisibleResetPass = true;
  160 + }
  161 + else {
145 162
146 $rootScope.isVisibleLogin = true; 163 $rootScope.isVisibleLogin = true;
147 $rootScope.isVisibleResetPass = false; 164 $rootScope.isVisibleResetPass = false;
@@ -152,7 +169,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A @@ -152,7 +169,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
152 AuthenticateAlreadyLoggedInUser(); 169 AuthenticateAlreadyLoggedInUser();
153 } 170 }
154 var isRememberChecked = $rootScope.getLocalStorageValue('isRememberMeChecked'); 171 var isRememberChecked = $rootScope.getLocalStorageValue('isRememberMeChecked');
155 - 172 +
156 if ($rootScope.getLocalStorageValue('isRememberMeChecked') != "" && sessionStorage.getItem("loginSession") == null) { 173 if ($rootScope.getLocalStorageValue('isRememberMeChecked') != "" && sessionStorage.getItem("loginSession") == null) {
157 sessionStorage.setItem("loginSession", "true"); 174 sessionStorage.setItem("loginSession", "true");
158 } 175 }
@@ -162,17 +179,18 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A @@ -162,17 +179,18 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
162 $rootScope.userInfo = { username: $rootScope.getLocalStorageValue('RememberMeLoginId'), password: $rootScope.getLocalStorageValue('RememberMePassword'), rememberChk: true }; 179 $rootScope.userInfo = { username: $rootScope.getLocalStorageValue('RememberMeLoginId'), password: $rootScope.getLocalStorageValue('RememberMePassword'), rememberChk: true };
163 }, 800); 180 }, 800);
164 } 181 }
  182 + }
165 } 183 }
166 - }  
167 -  
168 - else {  
169 -  
170 - $rootScope.isVisibleLogin = true;  
171 184
172 - $rootScope.promptUserForCookies(); 185 + else {
  186 +
  187 + $rootScope.isVisibleLogin = true;
  188 +
  189 + $rootScope.promptUserForCookies();
  190 + }
  191 +
  192 + $rootScope.getConfigurationValues();
173 } 193 }
174 -  
175 - $rootScope.getConfigurationValues();  
176 } 194 }
177 $rootScope.getConfigurationValues = function () 195 $rootScope.getConfigurationValues = function ()
178 { 196 {
@@ -381,6 +399,271 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A @@ -381,6 +399,271 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
381 399
382 } 400 }
383 401
  402 +
  403 + $scope.ValidateClientSiteUrl = function () {
  404 +
  405 + debugger
  406 + var siteInfo = params.split('&');
  407 +
  408 + for (var i = 0; i < siteInfo.length; i++) {
  409 + debugger;
  410 + if (isCalsCredantialForSIte == "True") {
  411 + var paramInfo = siteInfo[i].split('=');
  412 + if (paramInfo[0] == 'calsCredantial') {
  413 +
  414 + $rootScope.siteUrlInfo.calsCreds = paramInfo[1];
  415 + console.log("$rootScope.siteUrlInfo.calsCreds" + $rootScope.siteUrlInfo.calsCreds);
  416 + }
  417 + else if (paramInfo[0] == 'username') {
  418 +
  419 + $rootScope.siteUrlInfo.username = paramInfo[1];
  420 + console.log("$rootScope.siteUrlInfo.username" + $rootScope.siteUrlInfo.username);
  421 + }
  422 + else if (paramInfo[0] == 'password') {
  423 +
  424 + $rootScope.siteUrlInfo.password = paramInfo[1];
  425 + console.log("$rootScope.siteUrlInfo.password " + $rootScope.siteUrlInfo.password);
  426 + }
  427 +
  428 + $rootScope.userInfo.username = $rootScope.siteUrlInfo.username;
  429 + $rootScope.userInfo.password = $rootScope.siteUrlInfo.password;
  430 + console.log("$rootScope.userInfo.username" + $rootScope.userInfo.username + " $rootScope.userInfo.password" + $rootScope.userInfo.password);
  431 +
  432 +
  433 + }
  434 + else {
  435 + var paramInfo = siteInfo[i].split('=');
  436 + if (paramInfo[0] == 'siteIP') {
  437 +
  438 + $rootScope.siteUrlInfo.siteIP = paramInfo[1];
  439 + console.log("$rootScope.siteUrlInfo.siteIP=" + $rootScope.siteUrlInfo.siteIP);
  440 + }
  441 + else if (paramInfo[0] == 'accountNumber') {
  442 +
  443 + $rootScope.siteUrlInfo.accountNumber = paramInfo[1];
  444 + console.log("$rootScope.siteUrlInfo.accountNumber=" + $rootScope.siteUrlInfo.accountNumber);
  445 + }
  446 + else if (paramInfo[0] == 'edition') {
  447 +
  448 + $rootScope.siteUrlInfo.edition = paramInfo[1];
  449 + console.log("$rootScope.siteUrlInfo.siteIP=" + $rootScope.siteUrlInfo.siteIP);
  450 + }
  451 + else if (paramInfo[0] == 'urlReferer') {
  452 +
  453 + $rootScope.siteUrlInfo.urlReferer = paramInfo[1];
  454 + console.log("$rootScope.siteUrlInfo.siteIP" + $rootScope.siteUrlInfo.siteIP);
  455 + }
  456 + else if (paramInfo[0] == 'remoteIPAddress') {
  457 +
  458 + $rootScope.siteUrlInfo.remoteIPAddress = paramInfo[1];
  459 + console.log("$rootScope.siteUrlInfo.remoteIPAddress" + $rootScope.siteUrlInfo.remoteIPAddress);
  460 + }
  461 +
  462 +
  463 + }
  464 + }
  465 + if (isCalsCredantialForSIte == "True") {
  466 + $rootScope.AuthenticateUser($rootScope.userInfo);
  467 + }
  468 + else {
  469 +
  470 +
  471 + console.log($rootScope.siteUrlInfo);
  472 +
  473 + AuthenticationService.validateClientSite($rootScope.siteUrlInfo)
  474 + .then(
  475 +
  476 + function (result) {
  477 + debugger;
  478 + console.log(result);
  479 + if (result != null) {
  480 +
  481 +
  482 + console.log(result);
  483 + if (result == LoginConstants.INVALID_CLIENT) {
  484 + $rootScope.isVisibleLogin = true;
  485 + $rootScope.errorMessage = LoginConstants.INVALID_CLIENT;
  486 + $("#messageModal").modal('show');
  487 + }
  488 + else if (result == LoginConstants.MSG_NOT_AUTHORIZE_SITE_USER) {
  489 + $rootScope.isVisibleLogin = true;
  490 + $rootScope.errorMessage = LoginConstants.MSG_NOT_AUTHORIZE_SITE_USER;
  491 + $("#messageModal").modal('show');
  492 + }
  493 +
  494 + else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_ACCOUNT_NUMBER_NOT_NULL) {
  495 + $rootScope.isVisibleLogin = true;
  496 + $rootScope.errorMessage = LoginMessageConstants.E_ACCOUNT_NUMBER_NOT_NULL;
  497 + $("#messageModal").modal('show');
  498 + }
  499 + else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_EDITION_ID_NOT_NULL) {
  500 + $rootScope.isVisibleLogin = true;
  501 + $rootScope.errorMessage = LoginMessageConstants.E_EDITION_ID_NOT_NULL;
  502 + $("#messageModal").modal('show');
  503 + }
  504 + else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_EDITION_NOT_LINKED_WITH_SITE) {
  505 + $rootScope.isVisibleLogin = true;
  506 + $rootScope.errorMessage = LoginMessageConstants.E_EDITION_NOT_LINKED_WITH_SITE;
  507 + $("#messageModal").modal('show');
  508 + }
  509 + else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.LICENSE_INACTIVE) {
  510 + $rootScope.isVisibleLogin = true;
  511 + $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE;
  512 + $("#messageModal").modal('show');
  513 + }
  514 +
  515 +
  516 + else {
  517 + if (typeof result.FirstName != undefined || result.FirstName != "" || result.FirstName != null) {
  518 + //code for modesty setting
  519 + if (result.LicenseInfo != null) {
  520 + if (result.Modesty) {
  521 + $rootScope.isModestyOn = true;
  522 + $rootScope.isModestyOff = false;
  523 + localStorage.setItem("globalModesty", "Y");
  524 + $rootScope.formsetting = {
  525 + ethnicity: null,
  526 + modesty: "Y"
  527 + }
  528 + $rootScope.UpdateAndCloseSetting($rootScope.formsetting)
  529 + }
  530 + else {
  531 + $rootScope.isModestyOn = false;
  532 + $rootScope.isModestyOff = true;
  533 + localStorage.setItem("globalModesty", "N");
  534 + $rootScope.formsetting = {
  535 + ethnicity: null,
  536 + modesty: "N"
  537 + }
  538 + $rootScope.UpdateAndCloseSetting($rootScope.formsetting)
  539 + }
  540 + }
  541 + else {
  542 + $rootScope.isModestyOn = true;
  543 + $rootScope.isModestyOff = false;
  544 + localStorage.setItem("globalModesty", "Y");
  545 + $rootScope.formsetting = {
  546 + ethnicity: null,
  547 + modesty: "Y"
  548 + }
  549 + $rootScope.UpdateAndCloseSetting($rootScope.formsetting)
  550 + }
  551 + //code for modesty setting
  552 +
  553 +
  554 +
  555 +
  556 + //LicenseId would be zero for admin that is why we set the haveRoleAdmin = true
  557 + if (result.LicenseId == 0) {
  558 + $rootScope.haveRoleAdmin = true;
  559 +
  560 + $rootScope.userData = result;
  561 + $rootScope.userModules = result.Modules;
  562 +
  563 + if ($scope.currentUserDetails == null || $scope.currentUserDetails == undefined || $scope.currentUserDetails == "") {
  564 + localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
  565 + }
  566 +
  567 + if (isCommingSoonModel == true) {
  568 +
  569 + ShowAssignedModulesPopup(result.Modules);
  570 +
  571 + //if (userInfo.rememberChk) {
  572 +
  573 + // $scope.saveRemeberMeDetails(result, userInfo);
  574 + //}
  575 +
  576 + sessionStorage.setItem("loginSession", "true");
  577 + localStorage.setItem('isCommingSoonModel', false);
  578 +
  579 + $rootScope.isVisibleLogin = false;
  580 + }
  581 +
  582 +
  583 + $location.path('/');
  584 +
  585 + }
  586 + else {
  587 + if (result.LicenseInfo != null ) {
  588 + //0.
  589 + $rootScope.userData = result;
  590 + $rootScope.userModules = result.Modules;
  591 +
  592 + //1. set haveRoleAdmin = false because LicenseInfo is not null
  593 + $rootScope.haveRoleAdmin = false;
  594 +
  595 + //2.
  596 + if ($scope.currentUserDetails == null || $scope.currentUserDetails == undefined || $scope.currentUserDetails == "") {
  597 +
  598 + localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
  599 + }
  600 +
  601 + // 3.ShowAssignedModulesPopup
  602 + //isCommingSoonModel =true only when user comes first time on application and login
  603 + //if (isCommingSoonModel == true) {
  604 +
  605 + // ShowAssignedModulesPopup(result.Modules);
  606 + //}
  607 +
  608 + //4.
  609 + //if ($scope.rememberChk) {
  610 +
  611 + // $scope.saveRemeberMeDetails(result, userInfo);
  612 + //}
  613 +
  614 + //5.
  615 + sessionStorage.setItem("loginSession", "true");
  616 + $rootScope.isVisibleLogin = false;
  617 +
  618 + //6. reset the isCommingSoonModel to false in local storage so that upcomming module pop up would not show again to the user after firts time
  619 + // localStorage.setItem('isCommingSoonModel', false);
  620 +
  621 + $location.path('/');
  622 +
  623 + }
  624 + else {
  625 + if ($('#dvTerms').length > 0) {
  626 + $('#dvTerms').html(result.TermsAndConditionsText);
  627 + }
  628 + $rootScope.isVisibleLogin = true;
  629 + $('#dvTermCondition').fadeIn();
  630 + $rootScope.userData = result;
  631 + $rootScope.haveRoleAdmin = false;
  632 + localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
  633 + $location.path('/');
  634 + }
  635 + }
  636 + }
  637 +
  638 +
  639 + }
  640 + }
  641 +
  642 +
  643 +
  644 + },
  645 +
  646 + function (error) {
  647 +
  648 + console.log(' Error in authentication = ' + error.statusText);
  649 + // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS);
  650 + $rootScope.isVisibleLogin = true;
  651 + $rootScope.errorMessage = error;
  652 + $("#messageModal").modal('show');
  653 +
  654 + }
  655 + )
  656 +
  657 + }
  658 + //$rootScope.siteUrlInfo.siteIP = siteInfo[0];
  659 + //$rootScope.siteUrlInfo.remoteIPAddress = siteInfo[1];
  660 + //$rootScope.siteUrlInfo.accountNumber = siteInfo[2];
  661 + //$rootScope.siteUrlInfo.edition = siteInfo[3];
  662 + //$rootScope.siteUrlInfo.urlReferer = siteInfo[4];
  663 +
  664 +
  665 + }
  666 +
384 $scope.saveRemeberMeDetails = function (result, userInfo) { 667 $scope.saveRemeberMeDetails = function (result, userInfo) {
385 668
386 localStorage.setItem('RememberMeLoginId', result.LoginId); 669 localStorage.setItem('RememberMeLoginId', result.LoginId);
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
@@ -361,7 +361,9 @@ AIA.constant(&quot;LoginConstants&quot;, { @@ -361,7 +361,9 @@ AIA.constant(&quot;LoginConstants&quot;, {
361 "ACCOUNT_NUMBER_NOT_EXIST": "1", 361 "ACCOUNT_NUMBER_NOT_EXIST": "1",
362 "EDITION_NOT_EXIST": "3", 362 "EDITION_NOT_EXIST": "3",
363 "MASTER_SITEIP_NOT_EXIST": "2", 363 "MASTER_SITEIP_NOT_EXIST": "2",
364 - "LICENSE_INACTIVE": "6" 364 + "LICENSE_INACTIVE": "6",
  365 + "INVALID_CLIENT": "Clinet is not valid",
  366 + "MSG_NOT_AUTHORIZE_SITE_USER": "User is not authorized.",
365 }); 367 });
366 368
367 AIA.constant("LoginMessageConstants", { 369 AIA.constant("LoginMessageConstants", {
@@ -400,6 +402,9 @@ AIA.constant(&quot;LoginMessageConstants&quot;, { @@ -400,6 +402,9 @@ AIA.constant(&quot;LoginMessageConstants&quot;, {
400 "UNABLE_TO_UNBLOCK": "We are unable to unblock. Please try after sometime.", 402 "UNABLE_TO_UNBLOCK": "We are unable to unblock. Please try after sometime.",
401 //"ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.", 403 //"ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.",
402 //"MAIL_NOT_SENT": "Mail not sent." 404 //"MAIL_NOT_SENT": "Mail not sent."
  405 + "E_ACCOUNT_NUMBER_NOT_NULL": "Account number cannot be null",
  406 + "E_EDITION_ID_NOT_NULL": "Edition Id cannot be zero.",
  407 + "E_EDITION_NOT_LINKED_WITH_SITE": "Your credentials are invalid. Please contact the site administrator of your institution.",
403 408
404 }) 409 })
405 AIA.constant("AdminConstants", { 410 AIA.constant("AdminConstants", {
400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js
@@ -22,6 +22,29 @@ @@ -22,6 +22,29 @@
22 return deferred.promise; 22 return deferred.promise;
23 }, 23 },
24 24
  25 + validateClientSite: function (clientInfo) {
  26 + var deferred = $q.defer();
  27 +
  28 + $http.post('/API/api/Client', JSON.stringify(clientInfo), {
  29 + headers: {
  30 + 'Content-Type': 'application/json'
  31 + }
  32 + })
  33 + .success(function (data, status, headers, config) {
  34 + console.log('success')
  35 + deferred.resolve(data);
  36 + }).error(function (data, status, headers, config) {
  37 + console.log('error')
  38 + deferred.reject(data);
  39 + $rootScope.isVisibleLogin = true;
  40 + $rootScope.errorMessage = data;
  41 + $("#messageModal").modal('show');
  42 +
  43 + });
  44 + return deferred.promise;
  45 + },
  46 +
  47 +
25 SendMailToUser: function (userInfo, havePassword) { 48 SendMailToUser: function (userInfo, havePassword) {
26 var deferred = $q.defer(); 49 var deferred = $q.defer();
27 50
400-SOURCECODE/AIAHTML5.Web/index.aspx 0 → 100644
  1 +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="ADAM.AIA.index" %>
  2 +
  3 +<!DOCTYPE html>
  4 +<html lang="en" ng-cloak ng-app="AIA">
  5 +<head>
  6 + <!--<base href="/AIAHTML5/" />-->
  7 + <!--<base href="/AIA/" />-->
  8 + <base href="/" />
  9 + <meta charset="utf-8">
  10 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
  11 + <!--<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">-->
  12 + <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0 maximum-scale=1.0" />
  13 + <title>A.D.A.M. Interactive Anatomy</title>
  14 +
  15 + <link href="themes/default/css/bootstrap/3.3.6/bootstrap.css" rel="stylesheet" />
  16 +
  17 +
  18 +
  19 +
  20 + <link href="themes/default/css/bootstrap/3.3.6/main.css" rel="stylesheet" />
  21 +
  22 + <link href="themes/default/css/bootstrap/3.3.6/secondeffect.css" rel="stylesheet" />
  23 +
  24 + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
  25 + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,800,700,600,400italic">
  26 +
  27 + <!--<link rel="styleSheet" href="themes/default/css/uigrid/ui-grid.min.css" />-->
  28 + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  29 + <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  30 + <!--[if lt IE 9]>
  31 + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  32 + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  33 + <![endif]-->
  34 + <link href="themes/default/css/bootstrap/3.3.6/jquery.mCustomScrollbar.css" rel="stylesheet" />
  35 +
  36 + <link href="themes/default/css/bootstrap/3.3.6/jquery-ui.css" rel="stylesheet" />
  37 +
  38 + <link href="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.css" rel="stylesheet" />
  39 + <link href="libs/video_4_12_11/css/video-js_4_12_11.css" rel="stylesheet" />
  40 + <link href="libs/jquery/jquery_plugin/SpeechBubble/css/bubble.css" rel="stylesheet" />
  41 + <link href="libs/jquery/jquery_plugin/slider-pips/jquery-ui-slider-pips.css" rel="stylesheet" />
  42 + <link href="themes/default/css/bootstrap/3.3.6/jquery.minicolors.css" rel="stylesheet" />
  43 + <link href="content/css/print-main.css" rel="stylesheet" />
  44 +
  45 + <!--Annotation Toolbar: Jcanvas-->
  46 + <style>
  47 + /*.ActiveDefaultColorAnnotation {
  48 + background-color: #000000!important;
  49 + }*/
  50 +
  51 +
  52 + #termList option:hover {
  53 + background-color: #3399FF !important;
  54 + color: #fff !important;
  55 + }
  56 +
  57 +
  58 + .ActiveFormattingButtonClass {
  59 + background-color: #1B92D0 !important;
  60 + }
  61 +
  62 + .Edittext-btn-css {
  63 + background: #4B4B4B;
  64 + padding: 4px;
  65 + cursor: pointer;
  66 + margin-right: 2px;
  67 + }
  68 +
  69 + /*.italic-btn-css {
  70 + background: #4B4B4B;
  71 + padding: 4px;
  72 + cursor: pointer;
  73 + margin-right: 2px;
  74 + }*/
  75 +
  76 + .underline-btn-css {
  77 + background: #4B4B4B;
  78 + padding: 4px;
  79 + cursor: pointer;
  80 + margin-right: 5px;
  81 + }
  82 +
  83 +
  84 +
  85 + .activebtncolor {
  86 + background-color: #1B92D0 !important;
  87 + border-color: #1B92D0 !important;
  88 + color: #ffffff !important;
  89 + }
  90 +
  91 + .btn-black-annotation {
  92 + background-color: #4b4b4b;
  93 + border-color: #3f3f3f;
  94 + color: #ffffff;
  95 + }
  96 +
  97 + /*.btn-black-annotation:hover {
  98 + background-color: #1B92D0 !important;
  99 + border-color: #1B92D0 !important;
  100 + color: #ffffff !important;
  101 + }*/
  102 +
  103 + .custom-tooltip-annotation {
  104 + background-color: #fff;
  105 + border: 0 none;
  106 + color: #000;
  107 + left: -52px;
  108 + opacity: 0.9;
  109 + padding: 3px 0;
  110 + position: absolute;
  111 + text-align: center;
  112 + top: 41px;
  113 + width: 120px;
  114 + display: none;
  115 + z-index: 10000;
  116 + border: 1px solid #000;
  117 + color: #000;
  118 + border-radius: 0;
  119 + }
  120 +
  121 + /*7931*/
  122 + .custom-tooltip-annotation-edit {
  123 + background-color: #fff;
  124 + border: 0 none;
  125 + color: #000;
  126 + left: 80px;
  127 + opacity: 0.9;
  128 + padding: 3px 0;
  129 + position: absolute;
  130 + text-align: center;
  131 + bottom: 50px;
  132 + width: 120px;
  133 + display: none;
  134 + z-index: 10000;
  135 + border: 1px solid #000;
  136 + color: #000;
  137 + border-radius: 0;
  138 + }
  139 +
  140 + .custom-tooltip-annotation-toolbar {
  141 + background-color: #fff;
  142 + border: 0 none;
  143 + color: #000;
  144 + opacity: 0.9;
  145 + padding: 3px 0;
  146 + position: absolute;
  147 + text-align: center;
  148 + display: none;
  149 + z-index: 10000;
  150 + border: 1px solid #000;
  151 + color: #000;
  152 + border-radius: 0;
  153 + }
  154 +
  155 + .restrict-carret-icon {
  156 + font-size: 18px;
  157 + position: relative;
  158 + top: 1px;
  159 + }
  160 +
  161 + #refreshBtn {
  162 + color: #ffffff;
  163 + }
  164 + </style>
  165 +
  166 + <script>
  167 + var params = "<%=urlParams%>";
  168 + var isCalsCredantialForSIte ="<%=isCalsCredantial%>";
  169 + </script>
  170 +
  171 +</head>
  172 +<body ng-controller="HomeController" id="bo" ng-init="initializeAIA()" ng-keydown="CheckRefresh($event)">
  173 + <div ng-hide="isVisibleResetPass">
  174 + <div id="login" ng-show="isVisibleLogin">
  175 +
  176 + <div class="container-fluid loginBg">
  177 + <div class="row">
  178 + <div class="col-xs-12 text-center">
  179 + <a href="index.html" class="loginLogo"><img src="content/images/common/logo-large.png" class="img-responsive" alt=""></a>
  180 + <div class="headerBand row">
  181 + <div class="col-xs-12">
  182 + <h1>A.D.A.M. Interactive Anatomy</h1>
  183 + <p>The most comprehensive online interactive anatomy learning resource</p>
  184 + </div>
  185 + </div>
  186 + </div>
  187 + <!--LOGIN PANEL-->
  188 + <div class="col-xs-12 loginPanel">
  189 + <div class="loginBox clearfix">
  190 + <div class="col-xs-12">
  191 + <!--<strong>Login</strong>-->
  192 + <form>
  193 + <div class="form-group">
  194 + <!--<label for="">User ID</label>-->
  195 + <!--input type="email" class="form-control" placeholder="User ID">
  196 + <span class="help-block text-right small"><a href="#" class="color-white">Forgot User ID?</a></span>-->
  197 +
  198 +
  199 + <div class="input-group">
  200 + <span class="input-group-addon"><i class="fa fa-user"></i></span>
  201 + <input type="text" class="form-control" placeholder="Username" ng-model="userInfo.username">
  202 + </div>
  203 + <span class="help-block text-right small"><a href="#" class="color-white" id="forgotUserIdAnchor" data-toggle="modal" ng-click="forgotUserModalShow()" data-target=".forgot-sm">Forgot User ID?</a></span>
  204 +
  205 +
  206 + </div>
  207 + <div class="form-group">
  208 + <!--<label for="">Password</label>-->
  209 + <!--<input type="password" class="form-control" placeholder="Password">
  210 + <span class="help-block text-right small "><a href="#" class="color-white">Forgot Password?</a></span>-->
  211 + <div class="input-group">
  212 + <span class="input-group-addon"><i class="fa fa-key"></i></span>
  213 + <input type="password" id="UserPassword" class="form-control" placeholder="Password" ng-model="userInfo.password">
  214 + </div>
  215 + <span class="help-block text-right small "><a class="color-white" style="cursor: pointer;" id="forgotPasswordAnchor" data-toggle="modal" ng-click="forgotPwdModalShow();" data-target=".forgot-sm1">Forgot Password?</a></span> <!--#resetpass" href="/app/views/Home/resetPwd.html"-->
  216 + <div class="checkbox">
  217 + <label style="font-size: 85%;color:#fff !important;"><input type="checkbox" ng-model="userInfo.rememberChk" ng-click="RememberMe(this.userInfo.rememberChk)">Remember me</label>
  218 + </div>
  219 + </div>
  220 + <div class="form-group">
  221 + <button class="btn btn-primary pull-right" ng-click="AuthenticateUser(userInfo)">Log In</button>
  222 + </div>
  223 + </form>
  224 + </div>
  225 + </div>
  226 + <div class="loginExBtn">
  227 + <a href="https://store.adameducation.com/" target="_blank" class="btn btn-primary">Subscribe Now</a>
  228 + <a href="http://adameducation.com/aiaonline" target="_blank" class="btn btn-primary pull-right">Learn More</a>
  229 + </div>
  230 + </div>
  231 + </div>
  232 + </div>
  233 +
  234 + <!-- Footer -->
  235 + <footer class="dark">
  236 + <div class="container-fluid text-center">
  237 + <img class="browserIcons" src="content/images/common/chrome-icon.png" />
  238 + <img class="browserIcons" src="content/images/common/ie-icon.png" />
  239 + <img class="browserIcons" src="content/images/common/mozilla-icon.png" />
  240 + <img class="browserIcons" src="content/images/common/safari-icon.png" />
  241 + </div>
  242 + <div class="container-fluid text-center">Copyright &copy; {{current_year}} Ebix Inc. All rights reserved.</div>
  243 + </footer>
  244 + </div>
  245 + <!-- Forgot User ID (Small modal) -->
  246 + <div class="modal fade" id="forgotUserModal" role="dialog" tabindex="-1" aria-labelledby="exampleModalLabel" data-target=".forgot-sm">
  247 + <div class="modal-dialog modal-small" role="document">
  248 + <div class="modal-content">
  249 + <div class="modal-header">
  250 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
  251 + <h5 class="modal-title" id="exampleModalLabel">Enter your email id to recover User id</h5>
  252 + </div>
  253 + <div class="modal-body">
  254 + <form id="forgetUSerIdForm">
  255 + <div class="form-group">
  256 + <div class="input-group">
  257 + <span class="input-group-addon"><i class="fa fa-envelope"></i></span>
  258 + <input id="btnEmail" class="form-control" placeholder="Email" type="email" ng-model="userInfo.emailId">
  259 + </div>
  260 + </div>
  261 + </form>
  262 + </div>
  263 + <div class="modal-footer" style="padding-bottom:10px;">
  264 + <button type="button" class="btn btn-primary btn-block" ng-click="SendMailToUser(userInfo, false)">Send Mail</button>
  265 + </div>
  266 + <!--<div style="color: maroon; font-weight: bold; " ng-if="message">{{message}}</div>-->
  267 + </div>
  268 + </div>
  269 + </div>
  270 + <!-- Forgot Password (Small modal) -->
  271 + <div class="modal fade" id="forgotPwdModal" role="dialog" tabindex="-1" aria-labelledby="exampleModalLabel" data-target=".forgot-sm1">
  272 + <div class="modal-dialog modal-small" role="document">
  273 + <div class="modal-content">
  274 + <div class="modal-header">
  275 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
  276 + <h5 class="modal-title" id="exampleModalLabel">Enter your email id to unblock/ recover Password</h5>
  277 + </div>
  278 + <div class="modal-body" style="padding: 15px;">
  279 + <form id="forgetPwdForm" class="ng-pristine ng-valid ng-valid-email">
  280 + <div class="form-group">
  281 + <div class="">
  282 + <label class="radio-inline">
  283 + <input name="inlineRadioOptions" id="inlineRadio1" value="unblock" type="radio"> Unblock
  284 + </label>
  285 + <label class="radio-inline">
  286 + <input name="inlineRadioOptions" id="inlineRadio2" value="forgotpwd" type="radio"> Forgot Password
  287 + </label>
  288 + </div>
  289 + </div>
  290 +
  291 +
  292 + <div class="form-group">
  293 + <div class="input-group" style="margin-top: 8px;">
  294 + <span class="input-group-addon"><i class="fa fa-envelope"></i></span>
  295 + <input id="btnEmail2" class="form-control ng-pristine ng-untouched ng-valid ng-valid-email" placeholder="Email" ng-model="userInfo.emailId" type="email">
  296 + </div>
  297 + </div>
  298 + </form>
  299 + </div>
  300 + <div class="modal-footer modal-footer-forgot-password" style="padding-bottom:10px;">
  301 + <button type="button" class="btn btn-primary btn-block" ng-click="SendMailToUser(userInfo, true)">Send Mail</button>
  302 + </div>
  303 + <!--<div style="color: maroon; font-weight: bold; " ng-if="message">{{message}}</div>-->
  304 + </div>
  305 + </div>
  306 + </div>
  307 + <div id="index" ng-hide="isVisibleLogin">
  308 + <div class="container-fluid ">
  309 + <!--Header-->
  310 +
  311 + <nav class="navbar navbar-inverse navbar-fixed-top">
  312 + <div class="container-fluid">
  313 + <!-- Brand and toggle get grouped for better mobile display -->
  314 + <div class="navbar-header">
  315 + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#topFixedNavbar1" aria-expanded="false">
  316 + <span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
  317 + </button>
  318 + <a class="frameLogo navbar-brand"><img src="content/images/logo-main.png" class="img-responsive" alt=""></a>
  319 + </div>
  320 + <div ng-include="'app/widget/TopMenu.html'"></div>
  321 + </div>
  322 + </nav>
  323 + <div class="bodyWrap row container-fluid">
  324 +
  325 + <div id="spinner" class="spinner" ng-show="isLoading" style="visibility:hidden">
  326 + <img id="img-spinner" src="content/images/common/loading.gif" alt="Loading" />
  327 + </div>
  328 + <div ng-view></div>
  329 +
  330 + </div>
  331 + </div>
  332 +
  333 +
  334 +
  335 + <div class="modal fade" id="ShowListManager" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" ng-init="tab = 1" style="width:27%;left:50%;overflow:hidden;height:500px;top:100px">
  336 + <div class="modal-dialog" role="document" style="width:400px;">
  337 + <div class="modal-content" style="width:100%;max-width:400px;">
  338 + <div class="modal-header setting-modal-header" style="padding: 5px 10px; border-bottom: 1px solid #e5e5e5;">
  339 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  340 + <h4 class="modal-title" id="myModalLabel">Setting</h4>
  341 + </div>
  342 + <div class="modal-body">
  343 + <div class="row" style="padding-top:20px;">
  344 + <div class="col-sm-12">
  345 +
  346 + <div aria-label="..." role="group" class="btn-group btn-group-justified">
  347 + <div role="group" class="btn-group">
  348 + <button class="btn btn-sm btn-success" type="button" ng-click="tab = 1">Appearance</button>
  349 + </div>
  350 + <div role="group" class="btn-group">
  351 + <button class="btn btn-sm btn-success" type="button" ng-click="tab = 2">Lexicons</button>
  352 + </div>
  353 + <div role="group" class="btn-group">
  354 + <button class="btn btn-sm btn-success" type="button" ng-click="tab = 3">Dissectible</button>
  355 + </div>
  356 + </div>
  357 +
  358 + </div>
  359 +
  360 +
  361 + <div class="col-sm-12" ng-show="tab === 1">
  362 +
  363 +
  364 + <div class="row">
  365 + <div class="center-block col-md-11" style="float: none; background-color:#E2E2E2;height:300px;">
  366 + <div class="row" style="padding-top: 22px;">
  367 + <div class="center-block col-md-10" style="float: none; ">
  368 + <h5><strong>System Font</strong></h5>
  369 +
  370 + <div style="border:2px solid #ACACAC;float:left;padding:15px;background-color:#CCCCCC;">
  371 + <div class="col-md-3" style="padding-left:0px;">
  372 + Sample
  373 + </div>
  374 + <div class="col-md-6" style="padding-right:0px;">
  375 + <input type="text" value="" style="width:85%;">
  376 + </div>
  377 + <div class="col-md-3" style="padding-left:0px;">
  378 + <button class="btn btn-primary" style="margin-bottom:5px;">Change</button>
  379 + <button class="btn btn-primary" style="margin-bottom:5px;">Default</button>
  380 + </div>
  381 +
  382 + </div>
  383 + </div>
  384 + </div>
  385 +
  386 + </div>
  387 + </div>
  388 +
  389 + </div>
  390 + <div class="col-sm-12" ng-show="tab === 2">
  391 +
  392 +
  393 + <div class="row">
  394 + <div class="center-block col-md-11" style="float: none; background-color:#E2E2E2;height:300px;">
  395 + <div class="col-md-6">
  396 + <h6><strong>Primary Lexicon</strong></h6>
  397 + <input type="text" value="English" style="width:90%;">
  398 + <button class="btn btn-primary" style="float:right;margin-bottom:5px;margin-top:5px;">Change</button>
  399 + <h6>Secondry Lexicon</h6>
  400 + <textarea style="width:90%;"></textarea>
  401 + <button>Change</button>
  402 + <button>Change</button>
  403 + </div>
  404 + <div class="col-md-6">
  405 + <h6>Available Lexicon</h6>
  406 + <select multiple class="form-control" id="sel2">
  407 + <option>1</option>
  408 + <option>2</option>
  409 + <option>3</option>
  410 + <option>4</option>
  411 + <option>5</option>
  412 + </select>
  413 +
  414 + <p>Note: Some languages require special system fonts to display correctly</p>
  415 + </div>
  416 +
  417 + </div>
  418 + </div>
  419 +
  420 + </div>
  421 + <div class="col-sm-12" ng-show="tab === 3">
  422 +
  423 + <div class="row">
  424 + <div class="center-block col-md-11" style="float: none; background-color:#E2E2E2;height:300px;">
  425 + <h6>Skin Tones</h6>
  426 + <div class="center-block col-md-8" style="float: none;">
  427 + <div class="col-md-6">
  428 + <img class="img-responsive" alt="" src="http://placehold.it/400x300">
  429 + </div>
  430 + <div class="col-md-6">
  431 + <img class="img-responsive" alt="" src="http://placehold.it/400x300">
  432 + </div>
  433 + <div class="col-md-6">
  434 + <img class="img-responsive" alt="" src="http://placehold.it/400x300">
  435 + </div>
  436 + <div class="col-md-6">
  437 + <img class="img-responsive" alt="" src="http://placehold.it/400x300">
  438 + </div>
  439 +
  440 + </div>
  441 + <h6>Modesty Setting</h6>
  442 + <div class="col-md-6">
  443 + <div class="col-md-4">
  444 + <img class="img-responsive" alt="" src="http://placehold.it/400x300">
  445 + </div>
  446 + <div class="col-md-8">
  447 +
  448 + <div class="radio">
  449 + <label><input type="radio" name="optradio" checked>On</label>
  450 + </div>
  451 + <div class="radio">
  452 + <label><input type="radio" name="optradio">Off</label>
  453 + </div>
  454 +
  455 + </div>
  456 + </div>
  457 + <div class="col-md-6">
  458 + <h6>Annotaion</h6>
  459 + <div class="checkbox">
  460 + <label><input type="checkbox" value="" checked>Erase Annotations when changeing layers</label>
  461 + </div>
  462 + </div>
  463 + </div>
  464 +
  465 + </div>
  466 +
  467 +
  468 +
  469 + </div>
  470 + </div>
  471 + <div class="modal-footer">
  472 + <button type="button" class="btn btn-primary">Ok</button>
  473 + <button type="button" class="btn btn-primary" data-dismiss="modal">Cancle</button>
  474 + <button type="button" class="btn btn-primary">Apply</button>
  475 + </div>
  476 + </div>
  477 + </div>
  478 + </div>
  479 + </div>
  480 +
  481 + <!--Settings modal-->
  482 + <!--<div id="modal-settings" style="z-index: 1000000000; background: white;width: 302px;position:absolute;left:40%;right:0;top:70px;">-->
  483 + <div id="modelsettingsbackground" style="background-color: black; bottom: 0; display: none; height: 100%; left: 0; opacity: 0.5; position: fixed; right: 0; top: 0; width: 100%; z-index: 12000000;"></div>
  484 + <div id="modal-settings" style="display:none;z-index: 1000000000;height:auto;width: 300px;position:absolute;left:40%;right:0;top:70px;">
  485 + <div role="document">
  486 + <form>
  487 + <div ng-init="loadsettings()" class="modal-content" id="setting-modal-dark">
  488 + <div class="modal-header annotation-modal-header">
  489 + <button type="button" class="close" data-dismiss="modal" ng-click="CloseSetting()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  490 + <h4 class="modal-title" id="myModalLabel2">Settings</h4>
  491 + </div>
  492 + <div class="modal-body">
  493 + <div class="paddTop15">
  494 + <!-- Nav tabs -->
  495 + <ul class="nav nav-tabs" role="tablist">
  496 + <li role="presentation" ng-class="{'active':SettingsTab==1}"><a role="tab" class="padd5" ng-click="SetSettingActiveTab(1)">Appearance</a></li>
  497 + <li role="presentation" ng-class="{'active':SettingsTab==2}"><a role="tab" class="padd5" ng-click="SetSettingActiveTab(2);lexiconData()">Lexicons</a></li>
  498 + <li role="presentation" ng-class="{'active':SettingsTab==3}"><a role="tab" class="padd5" ng-click="SetSettingActiveTab(3)">Dissectible</a></li>
  499 +
  500 + </ul>
  501 + <!-- Tab panes -->
  502 + <div class="tab-content">
  503 + <div role="tabpanel" ng-class="{'tab-pane active' : SettingsTab === 1,'tab-pane' : SettingsTab !==1 }" id="appearance">
  504 + <div class="row">
  505 + <div class="col-sm-12">
  506 + <div class="well well-sm no-margin-btm">
  507 + <h5>System Font</h5>
  508 + <div class="form-group">
  509 + <label for="SystemFont" class="font13">Sample</label>
  510 + <input type="text" class="form-control" id="SystemFont" value="AaBbYyZz" disabled>
  511 + </div>
  512 + <button class="btn btn-success btn-sm" data-toggle="modal" data-target="#modal-change">Change</button>
  513 + <button class="btn btn-success btn-sm">Default</button>
  514 + </div>
  515 + </div>
  516 + </div>
  517 + </div>
  518 + <div role="tabpanel" ng-class="{'tab-pane active' : SettingsTab === 2,'tab-pane' : SettingsTab !==2 }" id="lexicons">
  519 + <div class="row paddingTopBtm10">
  520 + <div class="col-sm-6">
  521 + <div class="form-group">
  522 + <label for="SystemFont" class="font13">Primary Lexicon</label>
  523 + <input type="text" id="primarylaxican" class="form-control" value="English" name="1" disabled>
  524 + <button class="btn btn-sm btn-success btn-block marginTop5" id="laxicanlanguageChagne" disabled>Change</button>
  525 + </div>
  526 +
  527 + <div class="form-group">
  528 + <label for="SystemFont" class="font13">Secondary Lexicons</label>
  529 + <!--<textarea class="form-control" rows="3">-->
  530 + <select class="form-control" size="5" id="secondLax"></select>
  531 + <!--</textarea>-->
  532 + </div>
  533 + <div class="form-group">
  534 + <button class="btn btn-sm btn-success" id="laxiconLangAdd" disabled>Add</button>
  535 + <button class="btn btn-sm btn-success" id="laxiconLangRemove">Remove</button>
  536 + </div>
  537 + </div>
  538 + <div class="col-sm-6" style="padding-left:13px;padding-right:13px;">
  539 + <div class=" form-group">
  540 + <label for="SystemFont" class="font13">Available Lexicons</label>
  541 + <select class="form-control" size="8" id="lexiconLangDropdown"></select>
  542 + </div>
  543 + <p class="font11"><strong>Note :</strong> Some languages require special system fonts to display correctly</p>
  544 + </div>
  545 + <div class="clearfix"></div>
  546 + </div>
  547 + </div>
  548 + <div role="tabpanel" id="dissectible" ng-class="{'tab-pane active' : SettingsTab === 3,'tab-pane' : SettingsTab !==3 }">
  549 + <div class="">
  550 + <div class="col-sm-12">
  551 + <h5 class="bolder font13 no-margin-top">Skin Tones</h5>
  552 + <div class="skin-tones">
  553 + <div align="center">
  554 + <div class="col-sm-5">
  555 + <button id="btnEthnicW" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'W')">
  556 + <img src="~/../content/images/common/skin1.jpg" alt="">
  557 + </button>
  558 + </div>
  559 + <div class="col-sm-5">
  560 + <button id="btnEthnicB" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'B')">
  561 + <img src="~/../content/images/common/skin2.jpg" alt="">
  562 + </button>
  563 + </div>
  564 + <div class="col-sm-5">
  565 + <button id="btnEthnicL" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'A')">
  566 + <img src="~/../content/images/common/skin3.jpg" alt="">
  567 + </button>
  568 + </div>
  569 + <div class="col-sm-5">
  570 + <button id="btnEthnicA" class="thumbnail skinmarginbtm6" ng-model="formsetting.ethnicity" ng-click="ChangeEthnicity(formsetting,'L')">
  571 + <img src="~/../content/images/common/skin4.jpg" alt="">
  572 + </button>
  573 + </div>
  574 + </div>
  575 + </div>
  576 +
  577 + </div>
  578 + </div>
  579 + <div class="">
  580 + <div class="col-sm-6">
  581 + <h5 class="font13 bolder">Modesty Settings</h5>
  582 + <img src="~/../content/images/common/adam-leaf.png" alt="" class="pull-left marginR5">
  583 + <div class="radio">
  584 + <label>
  585 + <input type="radio" ng-checked="isModestyOn" ng-model="formsetting.modesty" value="Y" name="modestyRadios" id="modon" ng-click="ChangeModesty(formsetting,'Y')">
  586 + <span class="">On</span>
  587 + </label>
  588 + </div>
  589 + <div class="radio">
  590 + <label>
  591 + <input type="radio" ng-checked="isModestyOff" ng-model="formsetting.modesty" value="N" name="modestyRadios" id="modoff" ng-click="ChangeModesty(formsetting,'N')">
  592 + <span class="">Off</span>
  593 + </label>
  594 + </div>
  595 + </div>
  596 + <div class="col-sm-6">
  597 + <h5 class="font13 bolder">Annotation</h5>
  598 + <div class="checkbox no-margin">
  599 + <!--Settings > The entire highlighted part should be active-->
  600 + <label class="font11 no-margin-btm">
  601 + <input type="checkbox" value="" checked>
  602 + Erase Annotations when changing layers
  603 + </label>
  604 + </div>
  605 + </div>
  606 + </div>
  607 + </div>
  608 + </div>
  609 + </div>
  610 + </div>
  611 + <div class="modal-footer">
  612 + <button type="button" class="btn btn-primary" ng-click="UpdateAndCloseSetting(formsetting)">OK</button>
  613 +
  614 + <!--<button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>-->
  615 + <button type="button" class="btn btn-primary" ng-click="CloseSetting()">Cancel</button>
  616 + <button type="button" class="btn btn-primary" ng-click="UpdateSetting(formsetting)">Apply</button>
  617 + </div>
  618 + </div>
  619 + </form>
  620 + </div>
  621 + </div>
  622 + <div id="setting-spinner" style="display:none;position: fixed; top: 50%; left: 50%; margin-left: -50px; z-index: 15000; overflow: auto; width: 100px;">
  623 + <img id="img-spinner" src="content/images/common/loading.gif" alt="Loading">
  624 + </div>
  625 + <!--Annotation Modal-->
  626 + <div class="annotationTollbar" style="width: 300px;position: fixed; top: 80px; right: 20px; display: none; z-index: 1200000;">
  627 + <div class="annotationbar">
  628 + <div class="modal-content">
  629 + <div class="modal-header annotation-modal-header">
  630 + <button type="button" class="close" aria-label="Close" ng-click="CloseAnnotationTool()"><span aria-hidden="true">&times;</span></button>
  631 + <h4 class="modal-title" id="myModalLabel">Annotation</h4>
  632 + </div>
  633 + <div class="modal-body" id="AnnotaionPopupDiv">
  634 + <div class="row">
  635 + <div class="col-sm-12">
  636 + <h5>Mode</h5>
  637 +
  638 + <div class="btn-group btn-group-justified" role="group" aria-label="...">
  639 + <div class="btn-group" role="group" tooltip>
  640 + <div id="identify-block" style="display: none; font-size:13px;">Identify Mode</div>
  641 + <button id="OnIdentify" type="button" class="btn btn-sm btn-success" ng-click="OnIdentifyClick()">Identify</button>
  642 + </div>
  643 + <div class="btn-group" role="group">
  644 + <div id="draw-block" style="display: none; font-size: 13px;">Draw Mode</div>
  645 + <button id="DrawMode" type="button" ng-click="DrawingMode()" class="btn btn-sm btn-success">Draw</button>
  646 + </div>
  647 + </div>
  648 +
  649 + </div>
  650 + <div class="col-sm-12">
  651 + <h5>Tools</h5>
  652 + <div class="well well-popup">
  653 + <div class="" aria-label="...">
  654 + <div class="" role="group" align="center">
  655 + <div id="cursor-block" style="display: none; font-size:13px;"></div>
  656 + <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btnCursor" ng-mouseover="addToolTip(75, 60, 120, 'Select Cursor(s)')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="Cursor()"><img src="content/images/icon-identity.png" alt="" title=""></button>
  657 + <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-pin" ng-mouseover="addToolTip(75, 100, 120, 'Draw Pin')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawPin($event)"><img src="content/images/draw-pin.png" alt="" title=""></button>
  658 + <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-arrow" ng-mouseover="addToolTip(75, 120, 120, 'Draw Arrow')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawArrow($event)"><img src="content/images/draw-arrow.png" alt="" title=""></button>
  659 + <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-Text" ng-mouseover="addToolTip(75, 140, 120, 'Draw Text')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawText($event)"><img src="content/images/draw-text.png" alt="" title=""></button>
  660 + </div>
  661 + <div class="" role="group" align="center">
  662 + <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-line" ng-mouseover="addToolTip(95, 60, 120, 'Draw Line')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawLine($event)"><img src="content/images/draw-line.png" alt="" title=""></button>
  663 + <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-rectangle" ng-mouseover="addToolTip(95, 100, 120, 'Draw Rectangle')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawRectangle($event)"><img src="content/images/draw-rec.png" alt="" title=""></button>
  664 + <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-circle" ng-mouseover="addToolTip(95, 120, 120, 'Draw Circle')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawCircle($event)"><img src="content/images/draw-cir.png" alt="" title=""></button>
  665 + <!--<button type="button" class="btn btn-black-annotation btn-xs btn-annotation" ng-mouseover="addToolTip(95, 140, 120, 'Draw Polygon')" ng-mouseleave="removeToolTipOnMouseOut()" ng-click="DrawPolygon($event)"><img src="content/images/draw-poly.png" alt="" title=""></button>-->
  666 + <button type="button" class="btn btn-black-annotation" id="resetBtn" style="padding:1px 7px;display:none;" ng-click="resetDrawing()" ng-mouseover="addToolTip(95, 140, 120, 'Reset')" ng-mouseleave="removeToolTipOnMouseOut()"><i class="fa fa-refresh"></i></button>
  667 + </div>
  668 + </div>
  669 + </div>
  670 + <div class="well-popup well blankshapediv" ng-mouseover="addToolTip(200, 170, 120, 'Edit Style')" ng-mouseleave="removeToolTipOnMouseOut()">
  671 + <!--#7931-->
  672 +
  673 + <div id="edit-block" style="display: none; font-size: 13px;">Edit Shape Style</div>
  674 + <div id="previewBorder" class="outlinediv" ng-mouseover="addToolTip(170, 170, 120, 'Edit Style')" ng-mouseleave="removeToolTipOnMouseOut()">
  675 + <div id="shapeStyleDiv" style="background-color: #ffffff;" class="fullcolordiv" ng-click="disableAnnotationtoolOnListManager||enableAnnotationToolBar()">
  676 +
  677 + </div>
  678 +
  679 + </div>
  680 + </div>
  681 + <div class="well well-popup">
  682 + <div class="" role="group" aria-label="...">
  683 + <div>
  684 + <a href="#canvasPaint" data-tool="marker" data-size="1" data-color="#fff" id="annotationpaintbrushsize" ng-mouseover="addToolTip(270, 50, 120, 'Paint')" ng-mouseleave="removeToolTipOnMouseOut()" class="btn btn-black-annotation btn-xs pull-left btn-annotation btn-annotation-brush" role="button" data-placement="top" style="margin-right:1%;" ng-click="paintBrush()"><i class="fa fa-paint-brush"></i></a>
  685 + <a href="#canvasPaint" data-tool="eraser" class="btn btn-black-annotation btn-xs pull-left btn-annotation btn-annotation-erase" data-placement="top" data-size=" 1" id="annotationpainteraser" ng-click="EraseDrawing()" ng-mouseover="addToolTip(270, 70, 120, 'Erase')" ng-mouseleave="removeToolTipOnMouseOut()" role="button"><i class=" fa fa-eraser"></i></a>
  686 +
  687 + <!--<button type="button" id="annotationpainteraser" class="btn btn-black-annotation btn-xs pull-left btn-annotation btn-annotation-erase" data-placement="top" ng-click="EraseDrawing()" ng-mouseover="addToolTip(270, 70, 120, 'Erase')" ng-mouseleave="removeToolTipOnMouseOut()"><i class="fa fa-eraser"></i></button>-->&nbsp;
  688 + <div style="width: 80px; margin: 0px 0px 0px 4px; display: inline-block;float:left;">
  689 + <div style="width: 58px; float: left;" ng-mouseover="addToolTip(270, 100, 120, 'Brush Size')" ng-mouseleave="removeToolTipOnMouseOut()">
  690 + <input type="text" id="btnBrushSize" class="form-control" value="1" style="height:32px;border-radius:0;" oninput="Brushsize(this)">
  691 + </div>
  692 + <div style="width: 22px; float: left;">
  693 + <div style="width: 100%; float: left; height: 16px;">
  694 + <button type="button" id="btnBrushSizeIncrement" ng-mouseover="addToolTip(270, 100, 120, 'Brush Size')" ng-mouseleave="removeToolTipOnMouseOut()" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;">
  695 +
  696 + <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-up.png">
  697 + </button>
  698 + </div>
  699 + <div style="width: 100%; float: left; height: 16px;">
  700 + <button type="button" id="btnBrushSizeDecrease" ng-mouseover="addToolTip(270, 100, 120, 'Brush Size')" ng-mouseleave="removeToolTipOnMouseOut()" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;">
  701 + <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-down.png">
  702 + </button>
  703 + </div>
  704 + </div>
  705 +
  706 + </div>
  707 +
  708 +
  709 + <div class="pull-left pl-12" style="width:45%; margin-left:2%;margin-top:5px;">
  710 + <div id="slider-range-min-2" ng-mouseover="addToolTip(270, 170, 120, 'Brush Size')" ng-mouseleave="removeToolTipOnMouseOut()"></div>
  711 + </div>
  712 + <div class="clearfix"></div>
  713 + </div>
  714 +
  715 + </div>
  716 +
  717 +
  718 + </div>
  719 +
  720 + </div>
  721 + </div>
  722 + </div>
  723 +
  724 + </div>
  725 + </div>
  726 + </div>
  727 +
  728 + <!--Modal For Annotation Text Box-->
  729 + <div id="annotationTextModal" style="display:none;z-index: 1000000000;width:500px;height:241px;padding-right:0!important;position:fixed;left:0;right:0;top:0px;bottom:0;margin:auto;">
  730 +
  731 + <div class="modal-content">
  732 + <div class="modal-header" style="background-color: #808D43;padding:10px;border-bottom:0;">
  733 + <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>-->
  734 + <h4 class="modal-title" id="myModalLabel" style="font-weight:bold;">Enter Text to be put in a box</h4>
  735 + </div>
  736 + <div class="modal-body">
  737 + <div class="col-xs-12" style="padding:20px 0;">
  738 + <div class="form-inline">
  739 + <!--Annotation: Text in different font style is same.-->
  740 + <select class="form-control" id="selected-font-family"></select>
  741 + <select class="form-control" id="selected-font-size">
  742 + <option>14</option>
  743 + <option>16</option>
  744 + <option>18</option>
  745 + <option>20</option>
  746 + <option>22</option>
  747 + <option>24</option>
  748 + <option>26</option>
  749 + <option>28</option>
  750 + <option>36</option>
  751 + <option>48</option>
  752 + <option>72</option>
  753 + </select>
  754 + <span style="vertical-align:middle;">
  755 + <span id="text-bold" class="Edittext-btn-css">
  756 + <i aria-hidden="true" class="fa fa-bold" style="color: #fff"></i>
  757 + </span>
  758 + <span id="text-italic" class="Edittext-btn-css">
  759 + <i class="fa fa-italic" aria-hidden="true" style="color: #fff"></i>
  760 +
  761 + </span>
  762 + <span id="text-underline" class="underline-btn-css">
  763 + <i class="fa fa-underline" aria-hidden="true" style="color: #fff"></i>
  764 + </span>
  765 + </span>
  766 +
  767 + <div class="form-group" id="font-color" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;">
  768 +
  769 + <input type="text" id="saturation-demo" class="form-control demo" data-control="saturation" style="display:none;" value="#0088cc">
  770 + </div>
  771 + <div class="form-group" id="drawTextBGColorpicker" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;">
  772 + <input type="text" id="saturation-demo-background" class="form-control drawTextBG" data-control="saturation" style="display:none;" value="#0088cc">
  773 + </div>
  774 +
  775 + <span style="vertical-align:middle;">
  776 + <span id="text-left" class="Edittext-btn-css">
  777 + <i aria-hidden="true" class="fa fa-align-left" style="color: #fff"></i>
  778 + </span>
  779 + <span id="text-center" class="Edittext-btn-css">
  780 + <i class="fa fa-align-center" aria-hidden="true" style="color: #fff"></i>
  781 +
  782 +
  783 + </span>
  784 + <span id="text-right" class="underline-btn-css">
  785 + <i class="fa fa-align-right" aria-hidden="true" style="color: #fff"></i>
  786 +
  787 +
  788 + </span>
  789 + </span>
  790 +
  791 +
  792 + </div>
  793 + </div>
  794 + <textarea class="form-control" id="text_area" rows="3" style="font-family: 'Verdana, sans-serif';font-size:14px; font-weight: normal; font-style: normal; color: #000; text-align: left; text-decoration: none;"></textarea>
  795 +
  796 + <!--code for horizonatl text going out-->
  797 + <div id="atTextDiv" style="float:left;">
  798 + <span id="duptextspan" style="float: left; display: none;"></span>
  799 + <span id="textspan" style="display:none;"></span>
  800 + </div>
  801 + <!--code for horizonatl text going out-->
  802 +
  803 + </div>
  804 + <div class="modal-footer">
  805 + <!--<button type="button" class="btn btn-default" ng-click="closeModal()" data-dismiss="modal">Close</button>-->
  806 + <button type="button" class="btn btn-default" ng-click="closeModal()" id="closeEditText" data-dismiss="modal">Close</button>
  807 + <button type="button" id="saveBtn" class="btn btn-primary" data-dismiss="modal" ng-click="saveText()">Save</button>
  808 + </div>
  809 + </div>
  810 +
  811 + </div>
  812 +
  813 +
  814 +
  815 +
  816 + <!--List manager-->
  817 + <!--List manager-->
  818 + <style>
  819 + #listManager {
  820 + background: #fff;
  821 + border-radius: 3px;
  822 + border: 1px solid #ededed;
  823 + -webkit-box-shadow: 0px 0px 2px 1px rgba(173,173,173,1);
  824 + -moz-box-shadow: 0px 0px 2px 1px rgba(173,173,173,1);
  825 + box-shadow: 0px 0px 2px 1px rgba(173,173,173,1);
  826 + width: 350px;
  827 + position: absolute;
  828 + top: 170px;
  829 + left: 140px;
  830 + display: none;
  831 + z-index: 780000;
  832 + height: auto !important;
  833 + }
  834 +
  835 + #listManager .annotation-modal-header {
  836 + background: #818f44;
  837 + padding: 2px 10px;
  838 + }
  839 +
  840 + #listManager .annotation-modal-header h4 {
  841 + color: #fff;
  842 + font-size: 15px;
  843 + line-height: 20px;
  844 + }
  845 +
  846 + #listManager .modal-header .close {
  847 + color: #fff;
  848 + margin: 0;
  849 + opacity: 10;
  850 + text-shadow: none;
  851 + }
  852 +
  853 + #listManager .modal-footer {
  854 + padding: 5px 10px;
  855 + }
  856 + </style>
  857 + <div id="listManager" style="">
  858 + <div class="modal-header annotation-modal-header">
  859 + <button type="button" class="close" aria-label="Close" ng-click="CloseListManager()"><span aria-hidden="true">&times;</span></button>
  860 + <h4 class="modal-title" id="myModalLabel">List Manager</h4>
  861 + </div>
  862 + <div class="modal-body">
  863 + <div class="row paddingTopBtm10">
  864 + <div class="col-sm-12" ng-init="FillListManager()">
  865 +
  866 + <div class="form-group">
  867 + <label for="sel1">Window</label>
  868 + <select class="form-control" id="viewName" disabled>
  869 + <!--<option>Male Lateral</option>-->
  870 +
  871 + </select>
  872 + </div>
  873 + <div style="">
  874 + <div class="form-group">
  875 + <div ng-click="restrictBodySystemList()" class="btn btn-success btn-block" style="padding:3px 12px;">
  876 + <i class=" fa fa-caret-right restrict-carret-icon"></i> <span>Restrict List to</span>
  877 + </div>
  878 + </div>
  879 +
  880 + <div id="restrictListDiv" style="display:none;">
  881 + <div class="well well-sm marginTopBtm10">
  882 + <div class="form-horizontal">
  883 + <div class="form-group">
  884 + <label class="col-sm-4 control-label" for="System">System</label>
  885 + <div class="col-sm-8">
  886 + <select id="bodySystems" class="form-control" onchange="if (typeof (this.selectedIndex) != 'undefined') refreshTermListOnSystem(this.options[this.selectedIndex].id)"></select>
  887 + <select id="AABodySystems" class="form-control" onchange="if (typeof (this.selectedIndex) != 'undefined') refreshTermListOnSystemSel(this.options[this.selectedIndex].id)" style="display:none;"></select>
  888 + </div>
  889 + </div>
  890 + <div class="form-group">
  891 + <label class="col-sm-4 control-label" for="inputPassword3">Area</label>
  892 + <div class="col-sm-8">
  893 + <select class="form-control" disabled>
  894 + <option value="1" selected="">Entire View</option>
  895 + </select>
  896 + </div>
  897 + </div>
  898 + </div>
  899 + </div>
  900 +
  901 +
  902 + </div>
  903 +
  904 + <!--DA > List Manager > Multiple structure selection should not be available.-->
  905 + <div class="form-group">
  906 + <select id="termList" class="form-control" size="10" onclick="if (typeof (this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id, true)"></select>
  907 + </div>
  908 +
  909 + </div>
  910 + <div style="clear:both;"></div>
  911 +
  912 +
  913 +
  914 +
  915 + </div>
  916 + </div>
  917 +
  918 + </div>
  919 + <div class="modal-footer" id="totalTerms">
  920 + <!--<span class="pull-left marginTop5">424 Structures</span>-->
  921 + <!--<button data-dismiss="modal" class="btn btn-primary" type="button"><i class="fa fa-arrow-circle-right"></i></button>-->
  922 + </div>
  923 + </div>
  924 +
  925 + <!--background disable div-->
  926 +
  927 + <div id="modelbackground"></div>
  928 +
  929 +
  930 + <!--Edit Shape Modal-->
  931 +
  932 +
  933 + <div class="modeleditstyle" id="modeleditstyle" style="z-index: 1000000000; background: white;width: 302px;position:absolute;left:40%;right:0;top:70px;">
  934 + <div class="modal-content">
  935 + <div class="modal-header annotation-modal-header">
  936 + <h4 class="modal-title" id="myModalLabel33">Edit Shape Style</h4>
  937 + </div>
  938 + <form id="editStyleForm">
  939 + <div class="modal-body">
  940 + <div class="marginTopBtm10">
  941 + <div class="well well-sm no-margin-btm">
  942 + <div class="row">
  943 + <div class="col-sm-12">
  944 + <div class="checkbox no-margin">
  945 + <label>
  946 + <input id="fill-option" type="checkbox" checked onclick="enableDisableFillOption()"> Fill Option
  947 + </label>
  948 + </div>
  949 + </div>
  950 + <div class="col-sm-6 enableDisableOpacity">
  951 + <!--<div class="radio">
  952 + <label>
  953 + <input type="radio" name="filloption" id="filloption1" value="filloption1">
  954 + <span class="">Texture</span>
  955 + <img id="editstyleTexture" src="~/../content/images/common/annotation-tool-bar/pattern-picker.png" alt="" class="pattern-picker" data-toggle="modal" data-target="#pattern">
  956 + </label>
  957 + </div>-->
  958 + <div class="radio">
  959 + <label>
  960 + <input type="radio" name="filloption" id="filloption2" value="filloption2" checked style="margin-top:8px;">
  961 +
  962 +
  963 + <div id="editstylebackgroundcolor" class="form-group" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;float:left;">
  964 + <span style="font-weight: normal; float: left; padding-top: 5px; padding-right: 5px;">Color</span>
  965 + <input type="text" class="form-control outerBackgroundColor" data-control="saturation" style="display:none;" value="#0088cc">
  966 + </div>
  967 +
  968 +
  969 + </label>
  970 + </div>
  971 + </div>
  972 + <div class="col-sm-6 no-padding marginTop10 enableDisableOpacity">
  973 + <div class="row">
  974 + <label class="pull-left" style="font-weight:normal;">Scale</label>
  975 + <div id="edit-slider-3" class="pull-left pl-12" style="width:62%; margin-left:3%; margin-top:2%;">
  976 + <div id="slider-range-min-3"></div>
  977 + </div>
  978 + </div>
  979 +
  980 + <div class="row">
  981 + <label class="pull-left" style="font-weight:normal;">Opacity</label>
  982 + <div id="edit-slider-4" class="pull-left pl-12" style="width:53%; margin-left:3%; margin-top:2%;">
  983 + <div id="slider-range-min-4"></div>
  984 + </div>
  985 + </div>
  986 +
  987 + <div class="clearfix"></div>
  988 +
  989 +
  990 + </div>
  991 + </div>
  992 +
  993 + </div>
  994 + </div>
  995 + <div class="marginTopBtm10">
  996 + <div class="well well-sm no-margin-btm">
  997 + <div class="row">
  998 + <div class="col-sm-12">
  999 + <div class="checkbox no-margin">
  1000 + <label>
  1001 + <input id="Outline-Option" onclick="enableDisableOutline()" type="checkbox" checked> Outline Option
  1002 + </label>
  1003 + </div>
  1004 + </div>
  1005 + <div class="col-sm-6 setEnableDisableForEditShapeStyle">
  1006 + <label class="marginTop5">
  1007 + <span style="font-weight: normal; float: left; padding-top: 5px; padding-right: 5px;">Color</span>
  1008 + <div class="form-group" id="outlineColor" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;float:left;">
  1009 +
  1010 + <input type="text" class="form-control borderColorCanvasPreview" data-control="saturation" style="display:none;" value="#0088cc">
  1011 + </div>
  1012 +
  1013 +
  1014 + </label>
  1015 + </div>
  1016 +
  1017 + <div class="col-sm-6 setEnableDisableForEditShapeStyle">
  1018 + <div class="form-horizontal">
  1019 + <div class="form-group">
  1020 + <label class="col-sm-3 control-label" style=" font-weight:normal; padding-top:9px;">Size</label>
  1021 + <div class="col-sm-9 marginTop5">
  1022 + <select id="borderWidthCanvasElement" class="form-control input-sm">
  1023 + <option value="1">1</option>
  1024 + <option value="2">2</option>
  1025 + <option value="3">3</option>
  1026 + <option value="4">4</option>
  1027 + <option value="5">5</option>
  1028 + </select>
  1029 + </div>
  1030 + </div>
  1031 + </div>
  1032 + </div>
  1033 +
  1034 + </div>
  1035 + </div>
  1036 + </div>
  1037 +
  1038 + <div class="marginTopBtm10">
  1039 +
  1040 + <div class="well well-sm no-margin-btm blankshapediv">
  1041 + <div class="outlinediv" id="outlinedivId" style="border: 1px solid #000000;">
  1042 + <div id="imgOpacity" style="background-color: #ffffff" class="fullcolordiv imgopacity">
  1043 + </div>
  1044 + </div>
  1045 + </div>
  1046 +
  1047 + </div>
  1048 + </div>
  1049 + <div class="modal-footer">
  1050 + <button id="btnShapeStyle" type="button" class="btn btn-primary btn-sm" ng-click="setPropertiesForShapes('imgOpacity')">
  1051 + OK
  1052 + </button>
  1053 + <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button>
  1054 + </div>
  1055 + </form>
  1056 + </div>
  1057 + </div>
  1058 +
  1059 + <!--Export Image Modal-->
  1060 + <div class="modal fade export-image ui-draggable in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  1061 + style="z-index: 1200002;">
  1062 + <div class="modal-dialog modal-sm" role="document">
  1063 + <div class="modal-content">
  1064 + <div class="modal-header annotation-modal-header ui-draggable-handle">
  1065 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
  1066 + <h4 class="modal-title" id="">Save As</h4>
  1067 + </div>
  1068 + <div class="modal-body">
  1069 + <div class="row paddTopbtm15">
  1070 + <div class="col-sm-12">
  1071 + <div class="form-group">
  1072 + <label for="filename">Filename:</label>
  1073 + <div class="input-group">
  1074 + <input type="text" class="form-control" id="filename" placeholder="" ng-model="filename">
  1075 + <div class="input-group-addon">.jpg</div>
  1076 + </div>
  1077 + </div>
  1078 + </div>
  1079 + </div>
  1080 +
  1081 + </div>
  1082 + <div class="modal-footer">
  1083 + <div class="row">
  1084 + <input type="file" id="file1" style="display:none">
  1085 + <!--<a href="data:application/xml;charset=utf-8,your code here" download="filename.html">Save</a-->
  1086 + <div class="col-sm-12"><button id="btnSaveEI" class="btn btn-primary" data-dismiss="modal" type="button">Ok</button></div> <!--onclick="makeScreenshot();"--><!--ng-click="dialogs.saveAs()"--><!--ng-click="ShowAlert()"-->
  1087 + </div>
  1088 + </div>
  1089 +
  1090 + </div>
  1091 + </div>
  1092 + </div>
  1093 + <div class="modal fade export-image-ipad ui-draggable in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  1094 + style="z-index: 1200002;">
  1095 + <div class="modal-dialog modal-sm" role="document">
  1096 + <div class="modal-content">
  1097 + <div class="modal-header annotation-modal-header ui-draggable-handle">
  1098 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
  1099 + <h4 class="modal-title" id="">Download Export Image</h4>
  1100 + </div>
  1101 + <div class="modal-body">
  1102 + <div class="row paddTopbtm15">
  1103 + <div class="col-sm-12">
  1104 + <div class="form-group">
  1105 + <label for="filename">Exported image open in next Teb. Please download it</label>
  1106 +
  1107 + </div>
  1108 + </div>
  1109 + </div>
  1110 +
  1111 + </div>
  1112 + <div class="modal-footer">
  1113 + <div class="row">
  1114 + <input type="file" id="file1" style="display:none">
  1115 + <!--<a href="data:application/xml;charset=utf-8,your code here" download="filename.html">Save</a-->
  1116 + <div class="col-sm-12"><button id="btnPrintPreview" class="btn btn-primary" data-dismiss="modal" type="button">Ok</button></div> <!--onclick="makeScreenshot();"--><!--ng-click="dialogs.saveAs()"--><!--ng-click="ShowAlert()"-->
  1117 + </div>
  1118 + </div>
  1119 +
  1120 + </div>
  1121 + </div>
  1122 + </div>
  1123 + <!--Print Active Viewer-->
  1124 + <div class="print-box-active portrait-box-active" id="printBox" style="display: none;">
  1125 + <div id="printDivContent">
  1126 + <div class="">
  1127 + <div class="print-col-sm-4" style="top: 10px; position: absolute; left: 10px;">
  1128 + <span class="pull-left font12 print-span-font" id="spnModule"></span>
  1129 + </div>
  1130 + <div class="print-col-sm-4" style="top: 10px; position: absolute; right: 10px;">
  1131 + <span class="pull-right font12 print-span-font" id="spnBodyViewTitle"></span>
  1132 + </div>
  1133 + </div>
  1134 + <div class=" mar-top-25" align="center" id="dvPortrait" style="text-align: center;">
  1135 + <img src="" alt="" class="logo-image" id="snipImage" style="width: 100%;" />
  1136 + </div>
  1137 + <div>
  1138 + <div class="print-col-sm-4" style="position: absolute; bottom: 20px;">
  1139 + <span class="pull-left marginTop10 font12 print-span-font">Copyright {{current_year}} A.D.A.M., Inc. All Rights Reserved</span>
  1140 + </div>
  1141 + <div class="print-col-sm-4" style="position: absolute; bottom: 20px; right: 10px;">
  1142 + <span class="pull-right print-marginTop10 bgnone no-margin">
  1143 + <img class="logo-image" src="content/images/adam-logo-small.png" alt="">
  1144 + </span>
  1145 + </div>
  1146 + </div>
  1147 + <div class="clearfix"></div>
  1148 + </div>
  1149 + </div>
  1150 +
  1151 + <!--Print Preview Modal-->
  1152 + <div id="dvPrintPreview" style="display: none;"></div>
  1153 + </div>
  1154 + </div>
  1155 + <!--RESET PASSWORD FORM-->
  1156 + <div id="passwordReset" ng-show="isVisibleResetPass">
  1157 + <table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
  1158 + <tbody>
  1159 + <tr>
  1160 + <td align="center" valign="middle" bgcolor="#393939 " style="padding:30px 0 20px 0;"><a href="#"><img src="../content/images/logo.png" alt="AIA" title="AIA" /></a></td>
  1161 + </tr>
  1162 + <tr>
  1163 + <td align="center" valign="top" bgcolor="#808d43" style="padding:20px; overflow:hidden;">
  1164 + <form name="resetPasswordForm" novalidate>
  1165 + <table width="100%" border="0" cellspacing="0" cellpadding="0" ng-controller="HomeController">
  1166 + <tbody>
  1167 +
  1168 + <tr>
  1169 + <td style=" font-size:26px; font-weight:bold; color:#fff; font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif"><strong>Reset Password</strong></td>
  1170 + </tr>
  1171 + <tr>
  1172 + <td>&nbsp;</td>
  1173 + </tr>
  1174 + <tr>
  1175 + <td style="font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; color:#fff;">New Password </td>
  1176 + </tr>
  1177 + <tr>
  1178 + <td>
  1179 + <input class="form-control" name="newPassword" value="*****" type="password" style="padding:3px 5px; height:25px; width:98%;" ng-model="userInfo.newPassword" ng-minlength="8" ng-maxlength="20" required>
  1180 + <span style="color: maroon; font-weight:bold" ng-show="resetPasswordForm.newPassword.$touched && resetPasswordForm.newPassword.$invalid && resetPasswordForm.newPassword.$pristine">The password is required.</span>
  1181 + <p ng-show="resetPasswordForm.newPassword.$error.minlength" style="font-weight: bold; color: maroon;">Password length must be between 8 - 20 characters.</p>
  1182 + <p ng-show="resetPasswordForm.newPassword.$error.maxlength" style="font-weight: bold; color: maroon;">Password length must be between 8 - 20 characters.</p>
  1183 + </td>
  1184 + </tr>
  1185 + <tr>
  1186 + <td>&nbsp;</td>
  1187 + </tr>
  1188 + <tr>
  1189 + <td style="font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; color:#fff;">Confirm Password </td>
  1190 + </tr>
  1191 +
  1192 + <tr>
  1193 + <td>
  1194 + <input class="form-control" name="confirmPassword" value="*****" type="password" style="padding:3px 5px; height:25px; width:98%;" ng-model="userInfo.confirmPassword" required>
  1195 + <span style="color: maroon; font-weight: bold; " ng-show="resetPasswordForm.confirmPassword.$touched && resetPasswordForm.confirmPassword.$invalid">Confirm password is required.</span>
  1196 + <span style="color: maroon; font-weight: bold; " ng-if="resetPasswordForm.newPassword !== resetPasswordForm.confirmPassword">{{passwordMismatchMessage}}</span>
  1197 + </td>
  1198 + </tr>
  1199 + <tr>
  1200 + <td>&nbsp;</td>
  1201 + </tr>
  1202 + <tr>
  1203 + <td>
  1204 + <button type="submit" ng-disabled="resetPasswordForm.$invalid" ng-click="ResetUserPassword(userInfo)" style="background: #0072a7; border: 1px solid #005076; cursor: pointer; color: #fff; padding: 5px 10px; font-size: 16px; text-transform: uppercase; text-align: center; text-decoration: none; font-family: gotham, 'Helvetica Neue', helvetica, arial, sans-serif; " id="btnUpdatePassword">Submit</button> <!--ng-submit="submitForm(resetPwdForm.$valid)"--> <!--ng-click="ResetUserPassword(userInfo)"-->
  1205 + </td>
  1206 + </tr>
  1207 + </tbody>
  1208 + </table>
  1209 + </form>
  1210 + </tr>
  1211 +
  1212 +
  1213 + </tbody>
  1214 + </table>
  1215 + </div>
  1216 +
  1217 + <div class="modal fade" id="messageModal" role="dialog">
  1218 + <div class="modal-dialog">
  1219 +
  1220 + <div class="modal-content">
  1221 + <div class="modal-header">
  1222 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
  1223 + </div>
  1224 + <div class="modal-title"></div>
  1225 + <div class="modal-body">{{errorMessage}}</div>
  1226 + <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal">OK</button></div>
  1227 + </div>
  1228 + </div>
  1229 + </div>
  1230 +
  1231 + <!--Admin Form (Under Process)-->
  1232 +
  1233 +
  1234 + <!--Available modules list modal after login-->
  1235 + <div class=" fade ui-draggable in" id="dvUserModulesInfo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="padding-left: 17px; display: none; left: 0px !important; z-index: 111111; position: fixed; top: 0; overflow-x: hidden; overflow-y: auto; right: 0px; bottom: 0px; ">
  1236 + <div class="modal-dialog" role="document">
  1237 + <div class="modal-content">
  1238 + <div class="modal-header ui-draggable-handle " style="color: #ffffff; background-color: #0095da; border-color: #007ab3;cursor:default;">
  1239 + <!--color: #e5e5e5;-->
  1240 + <!--bg-primary-->
  1241 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
  1242 + <h4 class="text-left lhgt19 padd5" style="color:#fff; text-align:left;">Coming Soon...</h4>
  1243 + </div>
  1244 +
  1245 + <div class="modal-body">
  1246 + <div class="panel-body">
  1247 + <!-- form -->
  1248 + <form class="form-horizontal">
  1249 +
  1250 + <!--<hr style="border: 1px solid;"/>-->
  1251 + <!--<hr style="border: 1px solid;" />-->
  1252 + <div>
  1253 + <div class="form-group" id="moduleDiv7">
  1254 + <div class="col-sm-12"><i>• Curriculum Builder</i></div> <!--(To be available by 09/25/2017)-->
  1255 + </div>
  1256 + <div class="form-group" id="moduleDiv8">
  1257 + <div class="col-sm-8"><i>• Anatomy Test</i></div> <!--(To be available by 08/28/2017)-->
  1258 + </div>
  1259 + <div class="form-group" id="moduleDiv13">
  1260 + <div class="col-sm-8">• A.D.A.M Images</div>
  1261 + </div>
  1262 + </div>
  1263 + <div class="form-group">
  1264 + <div style="text-align: center">
  1265 + <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" data-dismiss="modal"><i class="fa fa-check"></i> OK</button>
  1266 + </div>
  1267 + </div>
  1268 + </form>
  1269 + </div>
  1270 + </div>
  1271 +
  1272 + </div>
  1273 + </div>
  1274 + </div>
  1275 +
  1276 + <!-- Terms & Condition Modal -->
  1277 + <div class=" fade ui-draggable in" id="dvTermCondition" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="padding-left: 17px; display: none; left: 0px !important; z-index: 111111; position: fixed; top: 0; overflow-x: hidden; overflow-y: auto; right: 0px; bottom: 0px; ">
  1278 + <div class="modal-dialog" role="document">
  1279 + <div class="modal-content">
  1280 + <div class="modal-header ui-draggable-handle " style="color: #ffffff; background-color: #0095da; border-color: #007ab3;cursor:default;">
  1281 + <!--color: #e5e5e5;-->
  1282 + <h6 class="text-left lhgt19 padd5" style="color:#fff; text-align:left;">Terms and Conditions</h6>
  1283 + </div>
  1284 +
  1285 + <div class="modal-body" style="width: 597px; height: 400px; overflow-x: auto;">
  1286 + <div class="panel-body">
  1287 + <div id="dvTerms" style="font-size: 13px;"></div>
  1288 + </div>
  1289 + </div>
  1290 + <div class="modal-footer ui-draggable-handle " style="color: #ffffff; cursor:default;">
  1291 + <!--background-color: #0095da; border-color: #007ab3;-->
  1292 + <!-- form -->
  1293 + <form class="form-horizontal">
  1294 + <!--<div class="form-group">-->
  1295 + <div style="clear: left; float: left; color: #000;"><input type="checkbox" id="chkAccept" ng-model="checked" style="vertical-align: top;" /> I accept</div>
  1296 + <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>
  1297 + <!--</div>-->
  1298 + </form>
  1299 + </div>
  1300 + </div>
  1301 + </div>
  1302 + </div>
  1303 + <script>
  1304 + function enableDisableFillOption() {
  1305 + if (document.getElementById('fill-option').checked) {
  1306 + // $('#imgOpacity').attr("background-color");
  1307 + //$('#imgOpacity').css({"background-color"})
  1308 + //$("#filloption1").css({ "pointer-events": "auto" });
  1309 + //$("#filloption12").css({ "pointer-events": "auto" });
  1310 +
  1311 + var x = $("#editstylebackgroundcolor span.minicolors-swatch-color").css('background-color');
  1312 + $("#imgOpacity").css("background-color", x);
  1313 + $("#edit-slider-3").css({ "pointer-events": "auto" });
  1314 + $("#edit-slider-4").css({ "pointer-events": "auto" });
  1315 + $("#editstylebackgroundcolor").css({ "pointer-events": "auto" });
  1316 + $("#editstyleTexture").css({ "pointer-events": "auto" });
  1317 + $(".enableDisableOpacity label").css({ "cursor": "pointer" });
  1318 + $(".enableDisableOpacity").css({ "opacity": "1" })
  1319 + document.getElementById("filloption1").disabled = false;
  1320 + document.getElementById("filloption2").disabled = false;
  1321 + document.getElementById("filloption1").style.cursor = "default";
  1322 + document.getElementById("filloption2").style.cursor = "default";
  1323 +
  1324 +
  1325 +
  1326 + }
  1327 + else {
  1328 + $('#imgOpacity').css("background-color", "transparent");
  1329 + //$("#filloption1").css({ "pointer-events": "none" });
  1330 + //$("#filloption2").css({ "pointer-events": "none" });
  1331 + $("#edit-slider-3").css({ "pointer-events": "none" });
  1332 + $("#edit-slider-4").css({ "pointer-events": "none" });
  1333 + $("#editstylebackgroundcolor").css({ "pointer-events": "none" });
  1334 + $("#editstyleTexture").css({ "pointer-events": "none" });
  1335 + $(".enableDisableOpacity label").css({ "cursor": "default" });
  1336 + $(".enableDisableOpacity").css({ "opacity": ".5" })
  1337 + document.getElementById("filloption1").disabled = true;
  1338 + document.getElementById("filloption2").disabled = true;
  1339 + document.getElementById("filloption1").style.cursor = "default";
  1340 + document.getElementById("filloption2").style.cursor = "default";
  1341 +
  1342 +
  1343 +
  1344 + }
  1345 +
  1346 + }
  1347 + function enableDisableOutline() {
  1348 +
  1349 + if (document.getElementById('Outline-Option').checked) {
  1350 + var x = $("#outlineColor span.minicolors-swatch-color").css('background-color');
  1351 + $(".marginTopBtm10 div.outlinediv").css("border-color", x);
  1352 + // var borderWidth = $("#outlineColor span.minicolors-swatch-color").css('border-width');
  1353 + // $("#imgOpacity").css("border-width", borderWidth);
  1354 +
  1355 + $("#borderWidthCanvasElement").css({ "pointer-events": "auto" });
  1356 + $("#outlineColor").css({ "pointer-events": "auto" });
  1357 + $(".setEnableDisableForEditShapeStyle").css({ "opacity": "1" })
  1358 + }
  1359 + else {
  1360 + $('.marginTopBtm10 div.outlinediv').css("border-color", "transparent");
  1361 + $("#borderWidthCanvasElement").css({ "pointer-events": "none" });
  1362 + $("#outlineColor").css({ "pointer-events": "none" });
  1363 + $(".setEnableDisableForEditShapeStyle").css({ "opacity": ".5" })
  1364 + }
  1365 + }
  1366 +
  1367 + </script>
  1368 +
  1369 + <script>
  1370 + function Brushsize(object) {
  1371 +
  1372 + object.value = object.value.replace(/[^0-9]/g, '');
  1373 + if (parseInt(object.value) <= 0) {
  1374 + object.value = 1;
  1375 + }
  1376 + if (parseInt(object.value) >= 1 && parseInt(object.value) <= 60) {
  1377 + object.value = object.value;
  1378 + }
  1379 + if (parseInt(object.value) > 60) {
  1380 + object.value = object.value.slice(0, 1);
  1381 +
  1382 + }
  1383 +
  1384 + }
  1385 + </script>
  1386 +
  1387 +
  1388 + <!--<script src="libs/jquery/1.11.3/jquery.min.js"></script>-->
  1389 + <script src="libs/jquery/2.1.3/jquery.min.js"></script>
  1390 + <script src="libs/jquery/1.11.4/jquery-ui.js"></script>
  1391 +
  1392 + <script src="libs/jquery/jquery_plugin/jquery.mCustomScrollbar.concat.min.js"></script>
  1393 + <script src="themes/default/scripts/bootstrap/3.3.5/bootstrap.js"></script>
  1394 + <script src="libs/angular/1.4.9/angular.min.js"></script>
  1395 + <script src="libs/angular/1.4.9/angular-route.min.js"></script>
  1396 + <script src="libs/angular/1.4.9/angular-sanitize.min.js"></script>
  1397 + <script src="libs/angular/1.4.9/ngStorage.js"></script>
  1398 + <script src="content/js/custom/custom.js"></script>
  1399 + <!--Annotation Toolbar : jcanvas Library-->
  1400 +
  1401 + <script src="libs/jcanvas/jcanvas.min.js"></script>
  1402 + <script src="libs/jcanvas/jcanvas.handle.min.js"></script>
  1403 +
  1404 + <script src="libs/jinqJs.js"></script>
  1405 + <script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js"></script>
  1406 + <script src="libs/video_4_12_11/video_4_12_11.js"></script>
  1407 + <script src="libs/jquery/jquery_plugin/SpeechBubble/bubble.js"></script>
  1408 + <!--<script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.min.js"></script>-->
  1409 + <script src="app/main/AIA.js"></script>
  1410 + <script src="app/main/Link.js"></script>
  1411 + <script src="content/scripts/js/custom/custom.js"></script>
  1412 + <script src="app/filters/ColorMatrixFilter.js"></script>
  1413 + <script src="app/utility/Matrix.js"></script>
  1414 + <script src="app/utility/Point.js"></script>
  1415 + <script src="app/utility/Rectangle.js"></script>
  1416 + <script src="app/utility/BitmapData.js"></script>
  1417 + <script src="app/utility/Paint.js"></script>
  1418 + <script src="app/controllers/DAController.js"></script>
  1419 + <script src="app/controllers/CIController.js"></script>
  1420 + <script src="app/controllers/CAController.js"></script>
  1421 + <script src="app/controllers/3dAController.js"></script>
  1422 + <script src="app/controllers/CurrBuildController.js"></script>
  1423 + <script src="app/controllers/AnatTestController.js"></script>
  1424 + <script src="app/controllers/LabExercController.js"></script>
  1425 + <script src="app/controllers/ADAMImgController.js"></script>
  1426 + <script src="app/controllers/AODController.js"></script>
  1427 + <script src="app/controllers/HomeController.js"></script>
  1428 + <script src="app/controllers/LinkController.js"></script>
  1429 + <script src="app/services/AuthenticationService.js"></script>
  1430 + <script src="app/services/ConfigurationService.js"></script>
  1431 + <script src="app/services/AdminService.js"></script>
  1432 + <script src="app/controllers/TileViewListController.js"></script>
  1433 +
  1434 + <script src="app/services/ModuleService.js"></script>
  1435 +
  1436 + <script src="app/services/DataService.js"></script>
  1437 + <script src="app/services/TermService.js"></script>
  1438 + <script src="libs/jquery/jquery_plugin/jqueryui.js"></script>
  1439 + <script src="libs/jquery/jquery_plugin/slider-pips/jquery-ui-slider-pips.js"></script>
  1440 + <script src="../app/services/LabExerciseService.js"></script>
  1441 + <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>
  1442 +
  1443 + <script src="libs/jquery/jquery_plugin/color-picker/jquery.minicolors.min.js"></script>
  1444 + <!--<script src="libs/colorpicker/jquery.minicolors.min.js"></script>-->
  1445 + <!--<script src="libs/color-picker/jquery.minicolors.min.js"></script>-->
  1446 +
  1447 + <script src="libs/sketch.js"></script>
  1448 +
  1449 + <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js"></script>-->
  1450 + <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script>
  1451 + <script src="libs/html2canvas.js"></script>
  1452 + <script src="libs/FileSaver.js"></script>
  1453 + <script src="app/services/LabExerciseService.js"></script>
  1454 + <!--<script type="text/javascript">
  1455 + $(function () {
  1456 + $('#canvas').sketch();
  1457 + });
  1458 + </script>-->
  1459 +
  1460 + <script>
  1461 +
  1462 + $(function () {
  1463 + $('[data-toggle="tooltip"]').tooltip();
  1464 + })
  1465 +
  1466 + </script>
  1467 + <script>
  1468 + (function ($) {
  1469 + $(window).load(function () {
  1470 + $(".sidebar").mCustomScrollbar({
  1471 + autoHideScrollbar: true,
  1472 + //theme:"rounded"
  1473 + });
  1474 +
  1475 + });
  1476 + })(jQuery);
  1477 + </script>
  1478 + <script>
  1479 + $(function () {
  1480 + $(".modal").draggable();
  1481 + $(".annotationTollbar").draggable();
  1482 + $(".modeleditstyle").draggable();
  1483 + $("#annotationTextModal").draggable();
  1484 + $("#modal-settings").draggable();
  1485 + });
  1486 + </script>
  1487 +
  1488 +
  1489 +
  1490 +
  1491 + <script type="text/javascript">
  1492 + $(function () {
  1493 +
  1494 + $("#text-left").on('click', function () {
  1495 +
  1496 + //Annotation: Formatting buttons color is not change when select.
  1497 +
  1498 + $("#text-center").removeClass("ActiveFormattingButtonClass");
  1499 + $("#text-right").removeClass("ActiveFormattingButtonClass");
  1500 + $("#text-left").addClass("ActiveFormattingButtonClass");
  1501 + $("#text_area").css("text-align", "left");
  1502 +
  1503 +
  1504 + });
  1505 +
  1506 +
  1507 + $("#text-center").on('click', function () {
  1508 +
  1509 + //Annotation: Formatting buttons color is not change when select.
  1510 +
  1511 + $("#text-right").removeClass("ActiveFormattingButtonClass");
  1512 + $("#text-left").removeClass("ActiveFormattingButtonClass");
  1513 + $("#text-center").addClass("ActiveFormattingButtonClass");
  1514 + $("#text_area").css("text-align", "center");
  1515 +
  1516 +
  1517 + });
  1518 +
  1519 +
  1520 + $("#text-right").on('click', function () {
  1521 +
  1522 + //Annotation: Formatting buttons color is not change when select.
  1523 +
  1524 + $("#text-left").removeClass("ActiveFormattingButtonClass");
  1525 + $("#text-center").removeClass("ActiveFormattingButtonClass");
  1526 + $("#text-right").addClass("ActiveFormattingButtonClass");
  1527 + $("#text_area").css("text-align", "right");
  1528 + });
  1529 +
  1530 +
  1531 + $("#text-bold").on('click', function () {
  1532 +
  1533 + //Annotation: Formatting buttons color is not change when select.
  1534 + $("#text-bold").toggleClass("ActiveFormattingButtonClass");
  1535 +
  1536 + if ($("#text-bold").hasClass("ActiveFormattingButtonClass")) {
  1537 + $("#text_area").css("font-weight", "bold");
  1538 + }
  1539 + else {
  1540 + $("#text_area").css("font-weight", "normal");
  1541 + }
  1542 +
  1543 +
  1544 + });
  1545 +
  1546 + $("#text-italic").on('click', function () {
  1547 +
  1548 + //Annotation: Formatting buttons color is not change when select.
  1549 + $("#text-italic").toggleClass("ActiveFormattingButtonClass");
  1550 + if ($("#text-italic").hasClass("ActiveFormattingButtonClass")) {
  1551 + $("#text_area").css("font-style", "italic");
  1552 + }
  1553 + else {
  1554 + $("#text_area").css("font-style", "normal");
  1555 + }
  1556 + });
  1557 +
  1558 + $("#text-underline").on('click', function () {
  1559 +
  1560 + //Annotation: Formatting buttons color is not change when select.
  1561 + $("#text-underline").toggleClass("ActiveFormattingButtonClass");
  1562 +
  1563 + if ($("#text-underline").hasClass("ActiveFormattingButtonClass")) {
  1564 + $("#text_area").css("text-decoration", "underline");
  1565 + }
  1566 + else {
  1567 + $("#text_area").css("text-decoration", "none");
  1568 + }
  1569 +
  1570 +
  1571 + });
  1572 +
  1573 +
  1574 + $("#selected-font-size").change(function () {
  1575 +
  1576 + $("#text_area").css("font-size", $(this).val() + "px");
  1577 + });
  1578 +
  1579 + $("#selected-font-family").change(function () {
  1580 +
  1581 + $("#text_area").css("font-family", $(this).val());
  1582 +
  1583 + });
  1584 +
  1585 +
  1586 + });
  1587 +
  1588 +
  1589 +
  1590 + </script>
  1591 +
  1592 +
  1593 + <script>
  1594 + $(document).ready(function () {
  1595 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
  1596 +
  1597 + var borderWidth = 1;
  1598 + var borderColor = "#000";
  1599 + $("#borderWidthCanvasElement").change(function () {
  1600 + borderWidth = $(this).val();
  1601 + borderColor = $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color");
  1602 +
  1603 + if (borderColor != null) {
  1604 + document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor;
  1605 + //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor);
  1606 + } else {
  1607 +
  1608 + // $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid");
  1609 + document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor;
  1610 +
  1611 + }
  1612 + });
  1613 +
  1614 +
  1615 +
  1616 + $('.borderColorCanvasPreview').each(function () {
  1617 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
  1618 + $(this).minicolors({
  1619 + control: $(this).attr('data-control') || 'hue',
  1620 + defaultValue: $(this).attr('data-defaultValue') || '',
  1621 + format: $(this).attr('data-format') || 'hex',
  1622 + keywords: $(this).attr('data-keywords') || '',
  1623 + inline: $(this).attr('data-inline') === 'true',
  1624 + letterCase: $(this).attr('data-letterCase') || 'lowercase',
  1625 + opacity: $(this).attr('data-opacity'),
  1626 + position: $(this).attr('data-position') || 'bottom left',
  1627 + swatches: $(this).attr('data-swatches') ? $(this).attr('data-swatches').split('|') : [],
  1628 + change: function (value, opacity) {
  1629 + if (!value) return;
  1630 + if (opacity) value += ', ' + opacity;
  1631 + if (typeof console === 'object') {
  1632 + console.log(value);
  1633 +
  1634 + borderColor = value;
  1635 + //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor);
  1636 + document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor;
  1637 +
  1638 +
  1639 + }
  1640 + },
  1641 + theme: 'bootstrap'
  1642 + });
  1643 +
  1644 +
  1645 + });
  1646 +
  1647 +
  1648 + $('.outerBackgroundColor').each(function () {
  1649 +
  1650 + $(this).minicolors({
  1651 + control: $(this).attr('data-control') || 'hue',
  1652 + defaultValue: $(this).attr('data-defaultValue') || '',
  1653 + format: $(this).attr('data-format') || 'hex',
  1654 + keywords: $(this).attr('data-keywords') || '',
  1655 + inline: $(this).attr('data-inline') === 'true',
  1656 + letterCase: $(this).attr('data-letterCase') || 'lowercase',
  1657 + opacity: $(this).attr('data-opacity'),
  1658 + position: $(this).attr('data-position') || 'bottom left',
  1659 + swatches: $(this).attr('data-swatches') ? $(this).attr('data-swatches').split('|') : [],
  1660 + change: function (value, opacity) {
  1661 + if (!value) return;
  1662 + if (opacity) value += ', ' + opacity;
  1663 + if (typeof console === 'object') {
  1664 + console.log(value);
  1665 + $("#imgOpacity").css("background-color", value);
  1666 +
  1667 + }
  1668 + },
  1669 + theme: 'bootstrap'
  1670 + });
  1671 +
  1672 + });
  1673 +
  1674 +
  1675 + });
  1676 + </script>
  1677 + <script>
  1678 + $(function () {
  1679 + function onBrushSizeChange() {
  1680 + $('.btnCursor').addClass('activebtncolor');
  1681 + $(".btn-annotation").removeClass("activebtncolor");
  1682 + $(".btn-annotation-erase").removeClass("activebtncolor");
  1683 + $(".btn-annotation-erase").removeClass("activebtncolor");
  1684 + $(".annotationpaintbrushsize").removeClass("activebtncolor");
  1685 + var x = $('#canvasPaint').css("z-index");
  1686 +
  1687 + var y = $('#canvas').css("z-index");
  1688 + if (x > y) {
  1689 + y = parseInt(x) + 1;
  1690 + } else {
  1691 + y = parseInt(y) + 1;
  1692 + }
  1693 + $('#canvas').css("z-index", y);
  1694 + }
  1695 +
  1696 + $("#slider-range-min-2").slider({
  1697 + range: "min",
  1698 + min: 1,
  1699 + max: 60,
  1700 + value: 1,
  1701 + slide: function (event, ui) {
  1702 +
  1703 + onBrushSizeChange();
  1704 +
  1705 +
  1706 +
  1707 + $("#btnBrushSize").val(ui.value);
  1708 +
  1709 + $("#annotationpaintbrushsize").css({ "pointer-events": "auto", "opacity": "1" });
  1710 + $("#annotationpainteraser").css({ "pointer-events": "auto", "opacity": "1" });
  1711 + $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" });
  1712 + $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" });
  1713 +
  1714 + },
  1715 + stop: function (event, ui) {
  1716 +
  1717 + $("#paintLine").attr("data-size", ui.value);
  1718 +
  1719 + }
  1720 +
  1721 + });
  1722 +
  1723 +
  1724 + $("#btnBrushSize").keydown(function () {
  1725 + $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" });
  1726 + $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" });
  1727 + onBrushSizeChange();
  1728 + var brushSizevalue = this.value;
  1729 +
  1730 + $("#slider-range-min-2").slider("value", parseInt(brushSizevalue));
  1731 + });
  1732 + $("#btnBrushSize").keyup(function () {
  1733 + onBrushSizeChange();
  1734 + var brushSizevalue = this.value;
  1735 + if (brushSizevalue == "") {
  1736 +
  1737 + $("#slider-range-min-2").slider("value", 0);
  1738 +
  1739 + $("#annotationpaintbrushsize").css({ "pointer-events": "none", "opacity": ".5" });
  1740 + $("#annotationpainteraser").css({ "pointer-events": "none", "opacity": ".5" });
  1741 + }
  1742 + else {
  1743 + $("#slider-range-min-2").slider("value", parseInt(brushSizevalue));
  1744 + $("#annotationpaintbrushsize").css({ "pointer-events": "auto", "opacity": "1" });
  1745 + $("#annotationpainteraser").css({ "pointer-events": "auto", "opacity": "1" });
  1746 + }
  1747 + // $("#slider-range-min-2").slider("value", parseInt(brushSizevalue));
  1748 + });
  1749 + $("#btnBrushSizeIncrement").click(function () {
  1750 + if ($("#annotationpaintbrushsize").css('pointer-events') == 'none') {
  1751 + $("#annotationpaintbrushsize").css({ "pointer-events": "auto", "opacity": "1" });
  1752 + $("#annotationpainteraser").css({ "pointer-events": "auto", "opacity": "1" });
  1753 + $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" });
  1754 + $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" });
  1755 + }
  1756 +
  1757 + onBrushSizeChange();
  1758 + var brushIncrementVar = $("#btnBrushSize").val();
  1759 + if (brushIncrementVar >= 60) {
  1760 + $("#slider-range-min-2").slider("value", 60);
  1761 + }
  1762 + else if (brushIncrementVar == "") {
  1763 + var brushIncrementedValue = 1;
  1764 + $("#btnBrushSize").val(brushIncrementedValue);
  1765 + $("#slider-range-min-2").slider("value", parseInt(brushIncrementedValue));
  1766 + }
  1767 + else {
  1768 +
  1769 + var brushIncrementedValue = parseInt(brushIncrementVar) + 1;
  1770 +
  1771 + $("#btnBrushSize").val(brushIncrementedValue);
  1772 + $("#slider-range-min-2").slider("value", parseInt(brushIncrementedValue));
  1773 + }
  1774 + });
  1775 + $("#btnBrushSizeDecrease").click(function () {
  1776 +
  1777 + onBrushSizeChange();
  1778 + var brushDecreaseVar = $("#btnBrushSize").val();
  1779 + if (brushDecreaseVar == "") {
  1780 +
  1781 + $("#btnBrushSizeDecrease").css({ "pointer-events": "none", "opacity": ".5" });
  1782 + $("#btnBrushSizeDecrease").css({ "pointer-events": "none", "opacity": ".5" });
  1783 +
  1784 + }
  1785 + else if (brushDecreaseVar <= 1) {
  1786 + $("#slider-range-min-2").slider("value", 1);
  1787 + if ($("#annotationpaintbrushsize").css('pointer-events') == 'none') {
  1788 + $("#annotationpaintbrushsize").css({ "pointer-events": "auto", "opacity": "1" });
  1789 + $("#annotationpainteraser").css({ "pointer-events": "auto", "opacity": "1" });
  1790 + $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": ".5" });
  1791 + $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": ".5" });
  1792 + }
  1793 +
  1794 + }
  1795 + else {
  1796 + var brushDecrementedValue = parseInt(brushDecreaseVar) - 1;
  1797 + if ($("#annotationpaintbrushsize").css('pointer-events') == 'none') {
  1798 + $("#annotationpaintbrushsize").css({ "pointer-events": "auto", "opacity": "1" });
  1799 + $("#annotationpainteraser").css({ "pointer-events": "auto", "opacity": "1" });
  1800 + $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" });
  1801 + $("#btnBrushSizeDecrease").css({ "pointer-events": "auto", "opacity": "1" });
  1802 + }
  1803 + $("#btnBrushSize").val(brushDecrementedValue);
  1804 + $("#slider-range-min-2").slider("value", parseInt(brushDecrementedValue));
  1805 + }
  1806 + });
  1807 +
  1808 + $("#btnBrushSize").val($("#slider-range-min-2").slider("value"));
  1809 + });
  1810 + </script>
  1811 +
  1812 + <script>
  1813 + $(function () {
  1814 + $("#slider-range-min-3").slider({
  1815 + range: "min",
  1816 + min: 0,
  1817 + max: 100,
  1818 + value: 20,
  1819 + change: function (event, ui) {
  1820 +
  1821 +
  1822 + }
  1823 + });
  1824 +
  1825 +
  1826 +
  1827 + });
  1828 + </script>
  1829 +
  1830 + <script>
  1831 + $(function () {
  1832 +
  1833 +
  1834 +
  1835 + $("#slider-range-min-4").slider(
  1836 + {
  1837 + range: "min",
  1838 + value: .5,
  1839 + min: 0,
  1840 + max: 1,
  1841 + step: .1,
  1842 + slide: function (event, ui) {
  1843 +
  1844 + $(".marginTopBtm10 .imgopacity").css("opacity", ui.value);
  1845 + $(".marginTopBtm10 div.outlinediv").css("opacity", ui.value);
  1846 + }
  1847 +
  1848 + }
  1849 +
  1850 +);
  1851 +
  1852 + });
  1853 +
  1854 +
  1855 +
  1856 + </script>
  1857 +
  1858 +
  1859 +
  1860 + <script>
  1861 + $(function () {
  1862 +
  1863 +
  1864 + $("#OnIdentify").on('mouseover', function () {
  1865 + $("#identify-block").addClass("custom-tooltip-annotation");
  1866 + $(".custom-tooltip-annotation").css('display', 'block');
  1867 + }).on('mouseout', function () {
  1868 + // $("#identify-block").removeClass("custom-tooltip-annotation");
  1869 + $(".custom-tooltip-annotation").css('display', 'none');
  1870 + $("#identify-block").removeClass("custom-tooltip-annotation");
  1871 + });
  1872 +
  1873 +
  1874 + $("#DrawMode").on('mouseover', function () {
  1875 + $("#draw-block").addClass("custom-tooltip-annotation");
  1876 + $(".custom-tooltip-annotation").css('display', 'block');
  1877 +
  1878 + }).on('mouseout', function () {
  1879 +
  1880 + $(".custom-tooltip-annotation").css('display', 'none');
  1881 + $("#draw-block").removeClass("custom-tooltip-annotation");
  1882 + });
  1883 +
  1884 + //#7931
  1885 + $("#OnEdtShape").on('mouseover', function () {
  1886 + $("#edit-block").addClass("custom-tooltip-annotation-edit");
  1887 + $(".custom-tooltip-annotation-edit").css('display', 'block');
  1888 +
  1889 + }).on('mouseout', function () {
  1890 +
  1891 + $(".custom-tooltip-annotation-edit").css('display', 'none');
  1892 + $("#edit-block").removeClass("custom-tooltip-annotation-edit");
  1893 + });
  1894 +
  1895 + });
  1896 + </script>
  1897 + <!-- Export Image Save Click-->
  1898 + <script>
  1899 + $(function () {
  1900 + $("#btnPrintPreview").click(function () {
  1901 + $("#canvasDiv").append("<img id='exportlogo' class='img-responsive' src='content/images/adam-logo-small.png'/>");
  1902 + html2canvas($("#canvasDiv"), {
  1903 + onrendered: function (canvas) {
  1904 + var imgsrc = canvas.toDataURL("image/png");
  1905 + console.log(imgsrc);
  1906 + var html = '<div id="img"><img src="' + imgsrc + '" id="newimg" style="margin:auto;top:0px;left:0px;right:0px;position:absolute;border:1px solid #ccc;" /></div>';
  1907 + var w = window.open();
  1908 + $(w.document.body).html(html);
  1909 + $("#filename").val("");
  1910 + $("#exportlogo").remove();
  1911 + }
  1912 + });
  1913 +
  1914 + });
  1915 + $("#btnSaveEI").click(function () {
  1916 + $("#canvasDiv").append("<img id='exportlogo' class='img-responsive' src='content/images/adam-logo-small.png'/>");
  1917 + html2canvas($("#canvasDiv"), {
  1918 + onrendered: function (canvas) {
  1919 + theCanvas = canvas;
  1920 + var fileName = document.getElementById("filename").value + '.jpg';
  1921 + if (typeof (fileName) == "undefined" || fileName == ".jpg")
  1922 + fileName = "Untitled.jpg"
  1923 + var dataURL = canvas.toDataURL("image/jpeg");
  1924 + var blob = dataURItoBlob(dataURL);
  1925 + console.log(blob);
  1926 + saveAs(blob, fileName);
  1927 + $("#exportlogo").remove();
  1928 + $("#filename").val("");
  1929 + }
  1930 + });
  1931 + $(".export-image").css("display", "none");
  1932 +
  1933 + });
  1934 + });
  1935 + function dataURItoBlob(dataURI) {
  1936 + var byteString = atob(dataURI.split(',')[1]);
  1937 + var ab = new ArrayBuffer(byteString.length);
  1938 + var ia = new Uint8Array(ab);
  1939 + for (var i = 0; i < byteString.length; i++) {
  1940 + ia[i] = byteString.charCodeAt(i);
  1941 + }
  1942 + return new Blob([ab], { type: 'image/jpeg' });
  1943 + }
  1944 + </script>
  1945 + <script>
  1946 + if (navigator.userAgent.match(/Android/i)) {
  1947 +
  1948 + $("#bodySystems").click(function () {
  1949 +
  1950 + $("#listManager").draggable('disable');
  1951 +
  1952 + }).blur(function () {
  1953 +
  1954 + $("#listManager").draggable('enable');
  1955 +
  1956 + });
  1957 +
  1958 +
  1959 +
  1960 + $("#termList").click(function () {
  1961 +
  1962 + $("#listManager").draggable('disable');
  1963 +
  1964 + }).blur(function () {
  1965 +
  1966 + $("#listManager").draggable('enable');
  1967 +
  1968 + });
  1969 +
  1970 + $("#borderWidthCanvasElement").click(function () {
  1971 +
  1972 + $("#modeleditstyle").draggable('disable');
  1973 + }).blur(function () {
  1974 + $("#modeleditstyle").draggable('enable');
  1975 + });
  1976 + }
  1977 + function ResizeImage(sizePercent) {
  1978 + var autoWidth = 427;
  1979 + var autoHeight = 547;
  1980 + var dvAutoSpnFontSize = 12;
  1981 + var imgLogoW = 77;
  1982 + var fullWidth = 620; //$('#canvasDiv').width();
  1983 + var fullHeight = 876; //$('#canvasDiv').height();
  1984 +
  1985 + if (sizePercent == 0) {
  1986 + $('#printBoxPor').width(autoWidth).height(autoHeight);//.height(dvPrintBoxPorH * sizePercent);
  1987 + $('#printBoxLan').width(autoHeight).height(autoWidth);
  1988 + $('#dvPortrait').width(autoWidth);
  1989 + $('#dvLandscape').width(autoHeight);
  1990 + $('.span-font').attr('style', 'font-size: ' + (dvAutoSpnFontSize * .65).toFixed() + 'px');
  1991 + $(".logo-image").attr('width', imgLogoW * .65);
  1992 + }
  1993 +
  1994 + else if (sizePercent == 1) {
  1995 + $('#dvPortrait').width(fullWidth * sizePercent);
  1996 + $('#dvLandscape').width(fullHeight * sizePercent);
  1997 + $('#printBoxPor').width(fullWidth * sizePercent).height(fullHeight * sizePercent);
  1998 + $('#printBoxLan').width(fullHeight * sizePercent).height(fullWidth * sizePercent);
  1999 + $('.span-font').attr('style', 'font-size: ' + dvAutoSpnFontSize + 'px');
  2000 + $(".logo-image").attr('width', imgLogoW);
  2001 + }
  2002 +
  2003 + else {
  2004 + $('#dvPortrait').width(fullWidth * sizePercent);
  2005 + $('#dvLandscape').width(fullHeight * sizePercent);
  2006 + $('.span-font').attr('style', 'font-size: ' + (dvAutoSpnFontSize * sizePercent).toFixed() + 'px !important');
  2007 + $(".logo-image").attr('width', (imgLogoW * sizePercent).toFixed());
  2008 + if (sizePercent > 1) {
  2009 + $('#printBoxPor').width(fullWidth * sizePercent).height(fullHeight * sizePercent);
  2010 + $('#printBoxLan').width(fullHeight * sizePercent).height(fullWidth * sizePercent);
  2011 + }
  2012 + else {
  2013 + $('#printBoxPor').width(fullWidth * sizePercent).height(fullHeight * sizePercent);
  2014 + $('#printBoxLan').width(fullHeight * sizePercent).height(fullWidth * sizePercent);
  2015 + }
  2016 + }
  2017 + }
  2018 + </script>
  2019 + <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.1.0/jquery.browser.min.js"></script>
  2020 +</body>
  2021 +
  2022 +</html>
0 \ No newline at end of file 2023 \ No newline at end of file
400-SOURCECODE/AIAHTML5.Web/index.aspx.cs 0 → 100644
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Linq;
  4 +using System.Web;
  5 +using System.Web.UI;
  6 +using System.Web.UI.WebControls;
  7 +
  8 +namespace ADAM.AIA
  9 +{
  10 + public partial class index : System.Web.UI.Page
  11 + {
  12 + public string strIPAddress = "";
  13 + public bool bValidIP = false;
  14 + public string strAccountNumber = "";
  15 + public string strEdition = "";
  16 + public string strUrlReferer = "";
  17 + public string strSiteReferer = "";
  18 + public string urlParams = "";
  19 + public string test = "";
  20 + public bool isCalsCredantial = false;
  21 +
  22 + protected void Page_Load(object sender, EventArgs e)
  23 + {
  24 +
  25 +
  26 + if (Request.HttpMethod == "POST")
  27 + {
  28 + if (Request.Form["calsCredantial"] != null && Request.Form["calsCredantial"].ToString() == "yes")
  29 + {
  30 + isCalsCredantial = true;
  31 +
  32 + urlParams = "calsCredantial=" + Request.Form["calsCredantial"].ToString() + "&username=" + Request.Form["calsUsername"].ToString() + "&password=" + Request.Form["calsPassword"].ToString();
  33 + //calsCredantialusername&password
  34 + // urlParams = Request.Form["calsCredantial"].ToString() + "&username=" + Request.Form["calsUsername"].ToString() + "&password=" + Request.Form["calsPassword"].ToString();
  35 +
  36 + }
  37 + }
  38 +
  39 + string c = "nm";
  40 + if (Request.QueryString["account"] != null)
  41 + {
  42 + // http://stackoverflow.com/questions/9032005/request-servervariableshttp-referer-is-not-working-in-ie
  43 + // http://stackoverflow.com/questions/5643773/http-referrer-not-always-being-passed?rq=1
  44 + //
  45 + strSiteReferer = Request.ServerVariables["HTTP_REFERER"];
  46 + strAccountNumber = Request.QueryString["account"];
  47 + strEdition = Request.QueryString["edition"];
  48 + string remoteIPAddress = Request.ServerVariables["REMOTE_ADDR"];
  49 + string strHttpReferer = null;
  50 + int intSiteId = 0;
  51 +
  52 +
  53 +
  54 +
  55 + if (Request.Form["referer"] != null)
  56 + {
  57 + strUrlReferer = Request.Form["referer"];
  58 + }
  59 + else if (Request.QueryString["referer"] == null)
  60 + {
  61 + strUrlReferer = Request.ServerVariables["HTTP_REFERER"];
  62 + }
  63 + else if (Request.Params["referer"] != null)
  64 + {
  65 + strUrlReferer = Request.Params["referer"];
  66 + }
  67 + else
  68 + {
  69 +
  70 + strUrlReferer = Request.QueryString["referer"];
  71 + }
  72 +
  73 +
  74 + if (strUrlReferer != "" && strUrlReferer != null)
  75 + {
  76 + strHttpReferer = strUrlReferer.ToLower().Replace("http://", "").Replace("https://", "").Replace("www.", "").ToString().Split('/')[0].ToString();
  77 +
  78 + if (strHttpReferer.IndexOf(":") != -1)
  79 + {
  80 + char[] delimiters = new char[] { ':' };
  81 + string[] parts = strHttpReferer.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
  82 + strHttpReferer = parts[0];
  83 + }
  84 + }
  85 +
  86 + try
  87 + {
  88 +
  89 + if (strHttpReferer != "" && strHttpReferer != null)
  90 + strIPAddress = strHttpReferer;
  91 + if (strIPAddress == "" || strIPAddress == null)
  92 + strIPAddress = remoteIPAddress;
  93 +
  94 +
  95 + // intSiteId = LicenseHelper.GetInstance().ValidateLicenseSiteIP(strIPAddress, remoteIPAddress, strAccountNumber, Convert.ToByte(strEdition));
  96 +
  97 + }
  98 + catch (Exception objEx)
  99 + {
  100 +
  101 + }
  102 + //urlParams = "?siteIP=" + strIPAddress + "&status=" + intSiteId + "&accountNumber=" + strAccountNumber + "&edition=" + strEdition + "&urlReferer=" + (strSiteReferer != "" && strSiteReferer != null ? strSiteReferer : "");
  103 + urlParams = "siteIP=" + strIPAddress + "&accountNumber=" + strAccountNumber + "&edition=" + strEdition + "&urlReferer=" + (strSiteReferer != "" && strSiteReferer != null ? strSiteReferer : "") + "&remoteIPAddress=" + remoteIPAddress;
  104 +
  105 + //For the ease of splitting desgined urlParms in the pattern of
  106 + //urlParams = siteIP&accountNumber&remoteIPAddress&edition&urlReferer; without mentioning the variableName
  107 + // urlParams = strIPAddress + "&" + remoteIPAddress+"&"+ strAccountNumber + "&" + strEdition + "&" + (strSiteReferer != "" && strSiteReferer != null ? strSiteReferer : "");
  108 +
  109 +
  110 + }
  111 + }
  112 + }
  113 +}
0 \ No newline at end of file 114 \ No newline at end of file
400-SOURCECODE/AIAHTML5.Web/index.aspx.designer.cs 0 → 100644
  1 +//------------------------------------------------------------------------------
  2 +// <auto-generated>
  3 +// This code was generated by a tool.
  4 +//
  5 +// Changes to this file may cause incorrect behavior and will be lost if
  6 +// the code is regenerated.
  7 +// </auto-generated>
  8 +//------------------------------------------------------------------------------
  9 +
  10 +namespace ADAM.AIA {
  11 +
  12 +
  13 + public partial class index {
  14 + }
  15 +}
400-SOURCECODE/AIAHTML5.Web/index.html renamed to 400-SOURCECODE/AIAHTML5.Web/index1.html