protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Session["lang"] = function.getParm("lang", "en").ToLower(); } lang = Session["lang"].ToString(); profile = (lang == "fr") ? "FCEI" : "CFIB"; // find/retrieve Profile custId parameter = profileParameters[4].value; JSON = v8server.profiles(profile); List <ProfileParameters> profileParameters = serializer.Deserialize <List <ProfileParameters> >(JSON); for (int i = 0; i < profileParameters.Count; i++) { if (profileParameters[i].id == "custId") { custId = profileParameters[i].value; } } logo.ImageUrl = "~/styles/logos/cfib_" + lang.ToLower() + ".png"; // temporary notice //if (lang == "fr") litNotice.Text = "À compter du 1er décembre 2018, la transition au SIMDUT 2015 sera terminée. Si vous suivez le cours SIMDUT 1988 et 2015 actuellement, veuillez le compléter avant le 30 novembre. À compter du vendredi 30 novembre, il y aura un nouveau cours intitulé SIMDUT 2015 - Un aperçu, disponible dans le Centre d'apprentissage."; // translate literals litHeader.Text = tran(litHeader.Text, lang); litWarning.Text = tran(litWarning.Text, lang); support.Text = tran(support.Text, lang); litRegister.Text = tran(litRegister.Text, lang); cfibId.Text = tran(cfibId.Text, lang); companyName.Text = tran(companyName.Text, lang); companyPhoneNumber.Text = tran(companyPhoneNumber.Text, lang); companyPostalCode.Text = tran(companyPostalCode.Text, lang); email1.Text = tran(email1.Text, lang); password1.Text = tran(password1.Text, lang); firstName.Text = tran(firstName.Text, lang); lastName.Text = tran(lastName.Text, lang); register.Text = tran(register.Text, lang); litSignIn.Text = tran(litSignIn.Text, lang); email2.Text = tran(email1.Text, lang); // use prev password2.Text = tran(password1.Text, lang); // use prev signIn.Text = tran(signIn.Text, lang); litPassword.Text = tran(litPassword.Text, lang); password.Text = tran(password.Text, lang); }
protected void Page_Load(object sender, EventArgs e) { // need profile to determine which fields to render _profile = function.getParm("profile", "").ToLower(); if (_profile.Length == 0) { status.Text = "missing profile"; } else { JSON = v8server.profiles(_profile); if (JSON == "null") { status.Text = "profile is invalid"; } else { // get profile parms List <ProfileParameters> profileParameters = serializer.Deserialize <List <ProfileParameters> >(JSON); _logo = getProfile(profileParameters, "logo", ""); _contentSource = getProfile(profileParameters, "contentSource", ""); _custId = getProfile(profileParameters, "custId", ""); _autoEnrollWs = getProfile(profileParameters, "autoEnrollWs", ""); // currently only setup to handle autoEnrollWs if (_autoEnrollWs != "True") { status.Text = "service is only configured for 'autoEnrollWs'"; } else { launch.Text = "<a href='http://corporate.vubiz.com/vubizApps/accessSimulator.aspx?profile=" + _profile + "'>" + "https://corporate.vubiz.com/vubizApps/accessSimulator.aspx?profile=" + _profile + "</a>"; custLogo.ImageUrl = "styles/logos/" + _logo; if (_contentSource != "assigned") { rowMembPrograms.Visible = false; } JSON = v8server.custTitle(_custId); CustTitle custTitle = serializer.Deserialize <CustTitle>(JSON); title.Text = custTitle.custTitle; container.Visible = true; status.Text = "Welcome. Please fill in the form then click \"Auto-Enroll & Launch\"."; } } } }
protected void Page_Load(object sender, EventArgs e) { debug = true; partnerKey = "B16%jpR96az1"; profile = function.getParm("profile", "").ToUpper(); inputProfile.Text = profile; lang = "en"; if (profile == "FCEI") { lang = "fr"; } if (profile != "CFIB" && profile != "FCEI") { Literal.Text = tran("Oops. This service has been accessed incorrectly.<br /> [Missing Profile].", lang); } ticket = function.getParm("vTicket", ""); ticketEncoded = HttpUtility.UrlEncode(ticket); inputTicket.Text = ticket; inputTicketEncoded.Text = ticketEncoded; isValidTicket = handshake.isValidTicket(ticketEncoded, partnerKey); WSisValidTicket.Text = isValidTicket; if (isValidTicket == "true") { memb_id = handshake.getMemberInfo(ticketEncoded, partnerKey, "memb_id"); WSmemb_id.Text = memb_id; HFmemb_id.Value = memb_id; memb_first_name = handshake.getMemberInfo(ticketEncoded, partnerKey, "memb_first_name"); WSmemb_first_name.Text = memb_first_name; memb_last_name = handshake.getMemberInfo(ticketEncoded, partnerKey, "memb_last_name"); WSmemb_last_name.Text = memb_last_name; memb_bus_name = handshake.getMemberInfo(ticketEncoded, partnerKey, "memb_bus_name"); WSmemb_bus_name.Text = memb_bus_name; // find/retrieve Profile custId parameter JSON = v8server.profiles(profile); List <ProfileParameters> profileParameters = serializer.Deserialize <List <ProfileParameters> >(JSON); //custId = profileParameters[4].value; for (int i = 0; i < profileParameters.Count; i++) { if (profileParameters[i].id == "custId") { custId = profileParameters[i].value; } } // confirm there is no cfib Member already registered JSON = v8server.cfibIsMember(custId, memb_id); //List<ProfileParameters> profileParameters = serializer.Deserialize<List<ProfileParameters>>(JSON); Status status = serializer.Deserialize <Status>(JSON); if (status.trueFalse == "True") { Literal.Text = tran("Oops!<br>An account has already been set up for your organization.", lang); } else { // Literal.Text = tran("Welcome. As an accredited CFIB Member, please Create An Account.<br />[CFIB Member ID: " + memb_id + "]", lang); Literal.Text = tran("Welcome. As an accredited CFIB Member, please Create An Account.<br />[CFIB Member ID:", lang) + " " + memb_id + "]"; } } else { Literal.Text = tran("We're sorry, only accredited CFIB Members can Create An Account.", lang); } logo.ImageUrl = "~/styles/logos/cfib_" + lang.ToLower() + ".png"; // translate support.Text = tran(support.Text, lang); header.Text = tran(header.Text, lang); title.Text = tran(title.Text, lang); email.Text = tran(email.Text, lang); password.Text = tran(password.Text, lang); firstName.Text = tran(firstName.Text, lang); lastName.Text = tran(lastName.Text, lang); signUpButton.Text = tran(signUpButton.Text, lang); }
protected void Page_Load(object sender, EventArgs e) { #region appSetup // instantiate classes Function function = new Function(); Assembler assembler = new Assembler(); // this builds out the HTML // test for random numbers, not used yet //int str = 1001, end = 9999; //string pooh = function.random(str, end); JavaScriptSerializer serializer = new JavaScriptSerializer(); // assemble all the pages as defined in the manifest into 3 blocks for insertion into default.aspx StringBuilder sbStyle = new StringBuilder(); StringBuilder sbHTML = new StringBuilder(); StringBuilder sbScript = new StringBuilder(); StringBuilder sbAppData = new StringBuilder(); // this is used only if there's a url parameter: peterDebug=y // then we can put whatever we want in this string and render it rather than the normal rendering StringBuilder sbAppDebug = new StringBuilder(); bool peterDebug = (function.getParm("peterDebug", "n") == "y") ? true : false; if (peterDebug) { sbAppDebug.Append("<br /><br />" + "debugging"); } string JSON = ""; // web service used for profiles/profileParameters/autoEnroll/translation, etc // the source of the service is determined by the web.config (for release) com.v8server v8server = new com.v8server(); // get hosts manifest array List <HostsManifest> hosts = serializer.Deserialize <List <HostsManifest> >(assembler.getRootManifest("_hosts")); // get apps array to see if it contains a secure section for hidden div bottom + get the appsVersion List <AppsManifest> apps = serializer.Deserialize <List <AppsManifest> >(assembler.getRootManifest("_apps")); // get the RTEhost from webConfig - this is the server from which the RTE launches and tracks - either corporate.vubiz.com or vubiz.com // for trials, azure must use either of the above string rteHost = ConfigurationManager.AppSettings["rteHost"]; // determine startup app based on who's calling us - use vubiz.apps/host.json string startUpAppId = function.getStartUpAppId(hosts); bool isDebug = function.isThisDebug(hosts); // see if there's an appId override on the URL profileParameters for the startUpAppId appId = function.getParm("appId", startUpAppId); // get the app values from the apps array - NOTE app MUST exist string appVersion = "", appProfileType = "", appProfileDefault = "", appTiles = "", appVideos = ""; for (int appsNo = 0; appsNo < apps.Count; appsNo++) { if (apps[appsNo].appsId == appId) { appVersion = apps[appsNo].appsVersion; appProfileType = apps[appsNo].appsProfileType; appProfileDefault = apps[appsNo].appsProfileDefault; appTiles = apps[appsNo].appsTiles; translateApp = apps[appsNo].appsTranslate == "y" ? true : false; appVideos = apps[appsNo].appsVideos; } } ; string profile = "", profileUrl = ""; string host = function.getHost().ToLower(); // the profile is mandatory and available from the appsProfileDefault or the url parameter (&profile=cfib) profileUrl = function.getParm("profile", "").ToLower(); if (profileUrl.Length > 0) { profile = profileUrl; } if (profile.Length == 0) { profile = appProfileDefault; } // advanced profiles and enroll/signin features are for appProfileType type = 0 (cfib) only string color = "", custId = "", custAcctId = "", custGuid = "", lang = "", membId = "", membEmail = "", membFirstName = "", membLastName = "", membPassword = "", membNo = "", membGuid = "", membMemo = "", pageId = "", startPage = "", membPrograms = "", membActive = "1", storeId = "1", returnUrl = "", cancelUrl = ""; string nameCatalogue = "", namePrograms = "", nameReports = ""; bool useVideos = false, isAutoEnroll = false, isAutoEnrollWs = false, isAutoSignIn = false, isSSOmembNo = false, isSSOmembId = false, isSSOmembGuid = false; // store profile data in <div id="profileState"... for appProfileType = 0, and empty for appProfileType = "n" sbAppData.Append("\n\t<div id='profileState' style='display:none'>"); if (peterDebug) { sbAppDebug.Append("<br /><br />" + "profile: " + profile); } if (peterDebug) { sbAppDebug.Append("<br /><br />" + "starting profileState"); } // get pages used in the app via the page manifest (error 1000 - invalid appId) - used to check is URL parm startPage is valid PLUS assembling the page set JSON = assembler.getManifest(appId, "_app"); if (JSON == "") { Response.Redirect("Errors.aspx?errorId=450&errorParm=" + appId, true); } AppManifest app = serializer.Deserialize <AppManifest>(JSON); List <PageManifest> page = serializer.Deserialize <List <PageManifest> >(assembler.getManifest(appId, "_pages")); List <TileManifest> tile = serializer.Deserialize <List <TileManifest> >(assembler.getManifest(appId, "_tiles")); #endregion #region profiles if (appProfileType == "n") /* no profile - simple utility - leave lots of room for more empty profiles*/ { sbAppData.Append("|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"); } else if (appProfileType == "0") /* advanced for v8/v8a */ { if (profile.Length == 0) { Response.Redirect("Errors.aspx?errorId=451&errorParm=" + profile, true); } JSON = v8server.profiles(profile); if (JSON == "null") { Response.Redirect("Errors.aspx?errorId=452&errorParm=" + profile, true); } List <ProfileParameters> profileParameters = serializer.Deserialize <List <ProfileParameters> >(JSON); if (peterDebug) { sbAppDebug.Append("<br /><br />" + JSON); } // extract the profile parameters from the profile table in the apps db (or use default) int i = -1; i++; sbAppData.Append(getProfile(profileParameters, "autoEnroll", "False") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "autoEnrollWs", "False") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "autoSignIn", "False") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "certPrograms", "") + "|"); /* if CustId present then expose the certificate programs tile and configure CustId - auto enroll into V5 */ i++; sbAppData.Append(getProfile(profileParameters, "certPrograms_E", "") + "|"); /* if CustId present then offer certificate programs, auto enroll into V5 */ i++; sbAppData.Append(getProfile(profileParameters, "color", "") + "|"); /* added Mar 14, 2018 to replace "skin" - color is used for headers, footers etc in v8 and Nop */ i++; sbAppData.Append(getProfile(profileParameters, "contentSource", "catalogue") + "|"); /* one of: catalogue/ecommerce/assigned/ecom-assigned (last was added for MPC Oct 25 2017) */ i++; sbAppData.Append(getProfile(profileParameters, "custId", "") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "ecommerce", "False") + "|"); /* show/hide the ecommerce subsystem tile */ i++; sbAppData.Append(getProfile(profileParameters, "emailFrom", "*****@*****.**") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "guests", "False") + "|"); /* show/hide the Guest subsystem tile */ i++; sbAppData.Append(getProfile(profileParameters, "guests_E", "False") + "|"); /* if member type = "E" then show/hide the Guest subsystem tile */ i++; sbAppData.Append(getProfile(profileParameters, "jit", "False") + "|"); /* show/hide the JIT subsystem tile */ i++; sbAppData.Append(getProfile(profileParameters, "lang", "en") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "lang_en", "") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "lang_fr", "") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "lang_es", "") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "lang_pt", "") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "logo", "") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "memb_E", "False") + "|"); /* if True then this account supports "employees" type - like CFIB */ i++; sbAppData.Append(getProfile(profileParameters, "password", "False") + "|"); /* default changed to False Apr 2, 2019 - most sites do not use passwords */ i++; sbAppData.Append(getProfile(profileParameters, "portal", "False") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "returnUrl", "") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "showSoloPrograms", "False") + "|"); /* if True than show single Programs rather than jumping to Module(s) */ i++; sbAppData.Append(getProfile(profileParameters, "sso", "") + "|"); /* one of: membNo, membId, membGuid, custMembGuid (NOP) */ i++; sbAppData.Append(getProfile(profileParameters, "storeId", "1") + "|"); /* use from NOP to so we know what store they are registering for */ i++; sbAppData.Append(getProfile(profileParameters, "videos", "False") + "|"); i++; sbAppData.Append(getProfile(profileParameters, "vukidz", "False") + "|"); /* show/hide the Vukidz features */ #region profile overrides // grab any text overrides in the profile then apply later so they can be translated (positioning added May 30 2018) // appTiles check added Apr 23, 2018 to avoid conflict with apps like "credentials2" if (appTiles == "1") { nameCatalogue = getProfile(profileParameters, "nameCatalogue", ""); namePrograms = getProfile(profileParameters, "namePrograms", ""); nameReports = getProfile(profileParameters, "nameReports", ""); } //if (appTiles == "1") //{ // // check if any page name overrides in the profile, if so change the page array AND the tile array // pageNameOverride = getProfile(profileParameters, "nameCatalogue", ""); // if (pageNameOverride != "") // { // foreach (var pageItem in page.Where(x => x.pageId == "catalogue")) pageItem.pageName = pageNameOverride; // foreach (var tileItem in tile.Where(x => (x.tilePage == "home") && (x.tileNo == "0"))) tileItem.tileTitle = pageNameOverride; // } // pageNameOverride = getProfile(profileParameters, "namePrograms", ""); // if (pageNameOverride != "") // { // foreach (var pageItem in page.Where(x => x.pageId == "programs")) pageItem.pageName = pageNameOverride; // } // pageNameOverride = getProfile(profileParameters, "nameReports", ""); // if (pageNameOverride != "") // { // foreach (var pageItem in page.Where(x => x.pageId == "historyPrograms2")) pageItem.pageName = pageNameOverride; // foreach (var tileItem in tile.Where(x => (x.tilePage == "home") && (x.tileNo == "23"))) tileItem.tileTitle = pageNameOverride; // } //} #endregion isAutoEnroll = (getProfile(profileParameters, "autoEnroll", "False") == "True") ? true : false; isAutoEnrollWs = (getProfile(profileParameters, "autoEnrollWs", "False") == "True") ? true : false; isAutoSignIn = (getProfile(profileParameters, "autoSignIn", "False") == "True") ? true : false; isSSOmembNo = (getProfile(profileParameters, "sso", "") == "membNo") ? true : false; isSSOmembId = (getProfile(profileParameters, "sso", "") == "membId") ? true : false; isSSOmembGuid = (getProfile(profileParameters, "sso", "") == "membGuid") ? true : false; lang = getProfile(profileParameters, "lang", "en"); custId = getProfile(profileParameters, "custId", ""); if (custId.Length == 4) { custAcctId = custId.Substring(4, 4); /* note this is wrong, need to get from customer table */ } color = getProfile(profileParameters, "color", ""); color = ""; // don't use color any more - stick to VU Blue color = (color == "") ? "#0178B9" : color; // if we use videos then we need to add in an icon at the top of each page, which than is controlled by the app page by page useVideos = (getProfile(profileParameters, "videos", "False") == "True") ? true : false; } sbAppData.Append("</div>\n"); if (peterDebug) { sbAppDebug.Append("<br /><br />" + sbAppData.ToString()); } int parmCount = 0; // we determine if the client uses localstore by the number of parmCounts #endregion #region base64 parms // other than profile, first check for base64 parms else regular parms string parms = function.getParm("parms", ""); if (parms != "") { parms = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(parms)); char[] split1 = { '&' }; string[] parms1 = parms.Split(split1); if (parms1.Length > 0) // extract supported values { char[] split2 = { '=' }; foreach (string parms2 in parms1) { string[] parms3 = parms2.Split(split2); // added .toLower when MORT passed in membID rather than membId if (parms3[0].ToLower() == "custid") { custId = parms3[1].ToString(); } if (parms3[0].ToLower() == "membid") { membId = parms3[1].ToString(); } if (parms3[0].ToLower() == "membno") { membNo = parms3[1].ToString(); } if (parms3[0].ToLower() == "pageid") { pageId = parms3[1].ToString(); } if (parms3[0].ToLower() == "lang") { lang = parms3[1].ToString(); } if (parms3[0].ToLower() == "membguid") { membGuid = parms3[1].ToString(); } // added Jan 25, 2018 if (parms3[0].ToLower() == "returnurl") { returnUrl = parms3[1].ToString(); } // added Dec 11, 2018 if (parms3[0].ToLower() == "startpage") { startPage = parms3[1].ToString(); } // added Jul 22, 2020 } } } #endregion #region url parms else { cancelUrl = function.getParm("cancelUrl", "").ToLower(); custId = function.getParm("custId", "").ToUpper(); // used in v8.register - passed in via NOP custGuid = function.getParm("custGuid", ""); // when present with a membId then we auto enroll (not used) lang = function.getParm("lang", "").ToLower(); // added May 30, 2018 for MPC to use same profile with different languages membActive = function.getParm("memb_active", "1"); // used in autoEnrollAdvanced membId = function.getParm("membId", "").ToUpper(); membEmail = function.getParm("membEmail", "").ToLower(); membFirstName = function.getParm("membFirstName", ""); membGuid = function.getParm("membGuid", "").ToUpper(); // this MUST be a temp guid - get real guid from GUID table membLastName = function.getParm("membLastName", ""); membMemo = function.getParm("membMemo", ""); membNo = function.getParm("membNo", ""); membPassword = function.getParm("membPassword", "").ToUpper(); // when present with a membId then we auto signIn membPrograms = function.getParm("membPrograms", "").ToUpper(); // used in autoEnrollAdvanced returnUrl = function.getParm("returnUrl", "").ToLower(); startPage = function.getParm("startPage", ""); startPage = function.isPage(page, startPage) ? "page_" + startPage : ""; storeId = function.getParm("storeId", "1"); // used for NOP to determine source of store } #endregion #region profile overrides // grabbed above, applied here for translation) if (nameCatalogue != "") { foreach (var pageItem in page.Where(x => x.pageId == "catalogue")) { pageItem.pageName = translate(nameCatalogue, lang); } foreach (var tileItem in tile.Where(x => (x.tilePage == "home") && (x.tileNo == "0"))) { tileItem.tileTitle = translate(nameCatalogue, lang); } } if (namePrograms != "") { foreach (var pageItem in page.Where(x => x.pageId == "programs")) { pageItem.pageName = translate(namePrograms, lang); } } if (nameReports != "") { foreach (var pageItem in page.Where(x => x.pageId == "historyPrograms2")) { pageItem.pageName = translate(nameReports, lang); } foreach (var tileItem in tile.Where(x => (x.tilePage == "home") && (x.tileNo == "23"))) { tileItem.tileTitle = translate(nameReports, lang); } } #endregion #region isSSOmembNo // sso using membNo from base64 parms - assumes learner is on file, get temp GUID if (isSSOmembNo) { if (function.isNumeric(membNo)) { JSON = v8server.ssoMembNo(membNo); //function.logTxt(JSON); // **** for testing only - log certain fields to text file if (JSON != "null") { SSOmembNo ssoMembNo = serializer.Deserialize <SSOmembNo>(JSON); membGuid = ssoMembNo.membGuid; } else { membGuid = ""; } } } #endregion #region isSSOmembId // sso using membId from base64 parms - assumes learner is on file if (isSSOmembId) { if (membId.Length > 0 && custId.Length > 0) { JSON = v8server.ssoMembId(custId, membId); if (JSON != "null") { AutoSignIn autoSignIn = serializer.Deserialize <AutoSignIn>(JSON); membGuid = autoSignIn.membGuid; membNo = autoSignIn.membNo; } else { membGuid = ""; membNo = ""; } } } #endregion #region isSSOmembGuid // sso using membGuid directly if (isSSOmembGuid) { JSON = v8server.ssoMembGuid(membGuid); if (JSON != "null") { SSOmembGuid ssoMembGuid = serializer.Deserialize <SSOmembGuid>(JSON); // membNo = ssoMembGuid.membNo; } else { membNo = ""; } } #endregion #region isAutoEnroll // autoenroll requires all fields except membMemo which is optional // values are typically passed in via URL // we don't need to do this is isAutoEnrollWs cuz it's been done earlier in a WS if (isAutoEnroll) { if (function.isGuid(custGuid) && membId.Length > 0 && membFirstName.Length > 0 && membLastName.Length > 0 && membEmail.Length > 0) { JSON = v8server.autoEnroll(custGuid, membId, membFirstName, membLastName, membEmail, membMemo); AutoEnroll autoEnroll = serializer.Deserialize <AutoEnroll>(JSON); if (autoEnroll.msgId.Substring(0, 2) == "ok") { custAcctId = autoEnroll.custAcctId; custId = autoEnroll.custId; membGuid = autoEnroll.membGuid; membNo = autoEnroll.membNo; } else { custAcctId = ""; custId = ""; membGuid = ""; membNo = ""; } } } #endregion #region isAutoEnrollWs // autoEnrollWs occurs outside of V8, it allows use of membPrograms and membActive // since custGuid and membGuid will be passed in the div, we don't need to do any more // v8/signin.js will sign in this member // when you get here we just need to signin using custGuid and membGuid //if (isAutoEnrollWs) //{ // if (function.isGuid(custGuid) && function.isGuid(membGuid)) // { // JSON = v8server.autoEnroll(custGuid, membId, membFirstName, membLastName, membEmail, membMemo); // AutoEnroll autoEnroll = serializer.Deserialize<AutoEnroll>(JSON); // if (autoEnroll.msgId.Substring(0, 2) == "ok") // { // custAcctId = autoEnroll.custAcctId; // custId = autoEnroll.custId; // membGuid = autoEnroll.membGuid; // membNo = autoEnroll.membNo; // } // else // { // custAcctId = ""; // custId = ""; // membGuid = ""; // membNo = ""; // } // } //} #endregion #region isAutoSignIn // autoSignin with custAcctId, membId and membPassword if (isAutoSignIn) { if (custAcctId.Length == 4 && membId.Length > 0 && membPassword.Length > 0) { JSON = v8server.autoSignIn(custAcctId, membId, membPassword); if (JSON != "null") { AutoSignIn autoSignIn = serializer.Deserialize <AutoSignIn>(JSON); membGuid = autoSignIn.membGuid; membNo = autoSignIn.membNo; } else { membGuid = ""; membNo = ""; } } } #endregion #region pass into Divs // if any of these are passed in any querystring values then we will not use localstorage but assume a fresh visit if (cancelUrl.Length > 0) { parmCount++; } if (custId.Length > 0) { parmCount++; } if (custGuid.Length > 0) { parmCount++; } if (membGuid.Length > 0) { parmCount++; } if (membId.Length > 0) { parmCount++; } if (membNo.Length > 0) { parmCount++; } if (membEmail.Length > 0) { parmCount++; } if (membFirstName.Length > 0) { parmCount++; } if (membLastName.Length > 0) { parmCount++; } if (membPassword.Length > 0) { parmCount++; } if (membMemo.Length > 0) { parmCount++; } if (returnUrl.Length > 0) { parmCount++; } if (storeId.Length > 0) { parmCount++; } if (lang.Length > 0) { parmCount++; // added May 30, 2018 } if (startPage.Length > 0) { parmCount++; // added Jul 22, 2020 } if (peterDebug) { sbAppDebug.Append("<br /><br />" + "appTiles: " + appTiles); } if (peterDebug) { sbAppDebug.Append("<br /><br />" + "starting tileState"); } #region store tile info in Div // get any tiles and embed as JSON string in hidden div // we need to embed them here so they can optionally be translated sbAppData.Append("\n\t<div id='tileState' style='display:none'>"); if (appTiles == "1") { // string tiles = assembler.getManifest(appId, "_tiles"); // orignal above was changed to list<T> to override titleTitle based on Profile entries // so we now need to create the JSON string string tiles = "["; for (var i = 0; i < tile.Count; i++) { tiles += "{"; tiles += "\"tilePage\": \"" + tile[i].tilePage + "\","; tiles += "\"tileNo\": \"" + tile[i].tileNo + "\","; tiles += "\"tileTitle\": \"" + tile[i].tileTitle + "\","; tiles += "\"tileColor\": \"" + tile[i].tileColor + "\","; tiles += "\"tileIcon\": \"" + tile[i].tileIcon + "\","; tiles += "\"tileClass\": \"" + tile[i].tileClass + "\""; tiles += "},"; } tiles += "]"; tiles = tiles.Replace("},]", "}]"); // remove trailing comma sbAppData.Append(tiles); sbAppData.Replace(" ", ""); // sbAppData.Replace("\t", ""); } sbAppData.Append("</div>\n"); if (peterDebug) { sbAppDebug.Append("<br /><br />" + sbAppData.ToString()); } string debug = (isDebug ? "y" : "n"); #endregion // store start data alphabetically in <div id="startState"... HttpBrowserCapabilities browser = Request.Browser; sbAppData.Append("\n\t<div id='startState' style='display:none'>"); sbAppData.Append(appId + "|"); sbAppData.Append(appProfileType + "|"); sbAppData.Append(appVersion + "|"); sbAppData.Append(appVideos + "|"); sbAppData.Append(cancelUrl + "|"); sbAppData.Append(custAcctId + "|"); sbAppData.Append(custGuid + "|"); sbAppData.Append(custId + "|"); sbAppData.Append(debug + "|"); sbAppData.Append(host + "|"); sbAppData.Append(lang + "|"); sbAppData.Append(membEmail + "|"); sbAppData.Append(membFirstName + "|"); sbAppData.Append(membGuid + "|"); sbAppData.Append(membId + "|"); sbAppData.Append(membLastName + "|"); sbAppData.Append(membNo + "|"); sbAppData.Append(pageId + "|"); sbAppData.Append(parmCount + "|"); sbAppData.Append(appProfileDefault + "|"); // not out of order, used in $vc5.js as profileDefault sbAppData.Append(profileUrl + "|"); sbAppData.Append(profile + "|"); sbAppData.Append(returnUrl + "|"); sbAppData.Append(rteHost + "|"); sbAppData.Append(startPage + "|"); sbAppData.Append(storeId + "|"); sbAppData.Append(translateApp + "|"); sbAppData.Append("empty</div>\n"); // insert the these parameter blocks and translate AppData.Text = translate(sbAppData.ToString(), lang); #endregion #region build page set // there are diffent type of pages, each with distinct layouts for (int pageNo = 0; pageNo < page.Count; pageNo++) { string pageHTML = page[pageNo].pageId.ToString(); assembler.assembleHTML(app, page, pageNo, useVideos, isDebug, sbStyle, sbHTML, sbScript); // replace any occurrence of $$ in a page or script with the pageId // note css or less scripts cannot use $$ since it can't be replaced sbHTML.Replace("$$", pageHTML); sbScript.Replace("$$", pageHTML); } // get the app script assembler.injectAppScript(appId, sbScript); // strip double spaces sbStyle.Replace(" ", ""); sbHTML.Replace(" ", ""); sbScript.Replace(" ", ""); // insert the code blocks (translate the HTML) unless we are in special debugging mode - change tag openings if (peterDebug) { AppDebug.Text = sbAppDebug.ToString().Replace(":none", ":normal"); } else { AppHead.Text = assembler.injectDocument_head(appId, isDebug); AppStyle.Text = "" + sbStyle.ToString() + "\n"; AppColor.Text = "<style>" + " .ui-header, .ui-footer { background-color:" + color + " !important; }" + " .ui-header { color:white !important; }" + " .ui-footer { color:" + color + " !important; }" + "</style>"; AppHtml.Text = "" + translate(sbHTML.ToString(), lang) + "\n"; AppScripts.Text = "<script id='page_scripts'>\n\t\t" + translate(sbScript.ToString(), lang) + "\n </script>"; AppBody.Text = assembler.injectDocument_body(appId, isDebug); } // these are a few values in the popups at the top of Default.aspx literal_Close.Text = translate("[[Close]]", lang); literal_Yes.Text = translate("[[Yes]]", lang); literal_No.Text = translate("[[No]]", lang); #endregion }