private bool DisplayEditConfiguration() { SiteAPI m_refSiteApi = new SiteAPI(); UserAPI m_refUserApi = new UserAPI(); SettingsData settings_data; UserData user_data; UserGroupData[] group_data; UserPreferenceData preference_data; try { AppImgPath = m_refSiteApi.AppImgPath; AppName = m_refSiteApi.AppName; AppPath = m_refSiteApi.AppPath; SITEPATH = m_refSiteApi.SitePath; user_data = m_refUserApi.GetUserById(Ektron.Cms.Common.EkConstants.BuiltIn, false, false); preference_data = m_refUserApi.GetUserPreferenceById(0); group_data = m_refUserApi.GetAllUserGroups("GroupName"); VerifyTrue = "<img src=\"" + AppPath + "images/UI/Icons/check.png\" border=\"0\" alt=\"Item is Enabled\" title=\"Item is Enabled\">"; VerifyFalse = "<img src=\"" + AppImgPath + "icon_redx.gif\" border=\"0\" alt=\"Item is Disabled\" title=\"Item is Disabled\">"; settings_data = m_refSiteApi.GetSiteVariables(m_refSiteApi.UserId, true); jsContentLanguage.Text = Convert.ToString(settings_data.Language); //VERSION td_version.InnerHtml = m_refMsg.GetMessage("version") + m_refSiteApi.Version + " " + m_refSiteApi.ServicePack; //BUILD NUMBER td_buildnumber.InnerHtml = "<i>(" + m_refMsg.GetMessage("build") + m_refSiteApi.BuildNumber + ")</i>"; //Which Editor m_SelectedEditControl = Utilities.GetEditorPreference(Request); //LICENSE //defect: 60170 //td_licensekey.InnerHtml = "<input type=\"text\" maxlength=\"4000\" name=\"license\" value=\"" + settings_data.LicenseKey + "\" />"; td_licensekey.InnerHtml ="<TEXTAREA name=\"license\" rows=\"1\" cols=\"1\">" + settings_data.LicenseKey + "</TEXTAREA>"; td_licensekey.InnerHtml += "<input type=\"hidden\" maxlength=\"4000\" name=\"license1\" value=\"" + settings_data.LicenseKey + "\" />"; td_licensekey.InnerHtml += "<br/>"; td_licensekey.InnerHtml += "<span class=\"ektronCaption\">" + m_refMsg.GetMessage("license key help text") + "</span>"; //MODULE LICENSE System.Text.StringBuilder module_text = new System.Text.StringBuilder(); int i = 0; if (!(settings_data.ModuleLicense == null)) { for (i = 0; i <= settings_data.ModuleLicense.Length - 1; i++) { if (i > 0) { module_text.Append("<div class=\"ektronTopSpaceSmall\"></div>"); } module_text.Append(i + 1 + ". "); module_text.Append("<input type=\"text\" maxlength=\"4000\" name=\"mlicense" + (i + 1) + "\" value=\"" + settings_data.ModuleLicense[i].License + "\">" + "\r\n"); module_text.Append("<input type=\"hidden\" name=\"mlicenseid" + (i + 1) + "\" value=\"" + settings_data.ModuleLicense[i].Id + "\">" + "\r\n"); } } module_text.Append("<div class=\"ektronTopSpaceSmall\"></div>"); module_text.Append(i + 1 + ". "); module_text.Append("<input type=\"text\" maxlength=\"4000\" name=\"mlicense" + (i + 1) + "\" value=\"\">" + "\r\n"); module_text.Append("<input type=\"hidden\" name=\"mlicenseid" + (i + 1) + "\" value=\"0\">" + "\r\n"); td_modulelicense.InnerHtml = module_text.ToString(); //LANGUAGE LIST LanguageData[] active_lang_list; active_lang_list = m_refSiteApi.GetAllActiveLanguages(); td_languagelist.InnerHtml = "<select id=\"language\" name=\"language\" selectedindex=\"0\">"; if (!(active_lang_list == null)) { for (i = 0; i <= active_lang_list.Length - 1; i++) { //If (Convert.ToString(active_lang_list(i).Id) = settings_data.Language) Then td_languagelist.InnerHtml += "<option value=\"" + active_lang_list[i].Id + "\" "; if (Convert.ToString(active_lang_list[i].Id) == settings_data.Language) { td_languagelist.InnerHtml += " selected"; } td_languagelist.InnerHtml += "> " + active_lang_list[i].Name + "</option>"; //End If } } td_languagelist.InnerHtml += "</select>"; //These settings only appliy to the eWebEditPro editor if (ConfigurationManager.AppSettings["ek_DataDesignControl"] != null && ConfigurationManager.AppSettings["ek_DataDesignControl"].ToString() == "eWebEditPro") { trSettings.Visible = true; trSummary.Visible = true; //MAX CONTENT SIZE td_maxcontent.InnerHtml = "<input type=\"Text\" maxlength=\"9\" size=\"9\" name=\"content_size\" value=\"" + settings_data.MaxContentSize + "\">"; td_maxcontent.InnerHtml += "<br/>"; td_maxcontent.InnerHtml += "<span class=\"ektronCaption\">" + m_refMsg.GetMessage("settings max content help text") + "</span>"; //MAX SUMMARY SIZE td_maxsummary.InnerHtml = "<input type=\"Text\" maxlength=\"9\" size=\"9\" name=\"summary_size\" value=\"" + settings_data.MaxSummarySize + "\" >"; td_maxsummary.InnerHtml += "<br/>"; td_maxsummary.InnerHtml += "<span class=\"ektronCaption\">" + m_refMsg.GetMessage("settings max summary help text") + "</span>"; } //SYSTEM EMAIL td_email.InnerHtml = "<input type=\"Text\" maxlength=\"50\" size=\"25\" name=\"SystemEmaillAddr\" value=\"" + settings_data.Email + "\">"; td_email.InnerHtml += "<div class=\"ektronCaption\">"; //EMAIL NOTIFICATION if (settings_data.EnableMessaging) { td_email.InnerHtml += "<input type=\"CHECKBOX\" name=\"EnableMessaging\" value=\"enable_msg\" CHECKED=\"True\">"; } else { td_email.InnerHtml += "<input type=\"CHECKBOX\" name=\"EnableMessaging\" value=\"enable_msg\">"; } td_email.InnerHtml += m_refMsg.GetMessage("enable mail messages") + " "; td_email.InnerHtml += "</div>"; //Server Type if (Convert.ToBoolean(settings_data.AsynchronousStaging)) { td_server_type.InnerHtml += "<input type=\"CHECKBOX\" name=\"SystemAsynchStaging\" value=\"enable_msg\" CHECKED=\"True\">"; } else { td_server_type.InnerHtml = "<input type=\"CHECKBOX\" name=\"SystemAsynchStaging\" value=\"enable_msg\" >"; } td_server_type.InnerHtml += "Staging Server" + " "; td_server_type.InnerHtml += "<br/>"; td_server_type.InnerHtml += "<span class=\"ektronCaption\">" + m_refMsg.GetMessage("lbl enable server type message") + "</span>"; //Asyncronous Processor Location if (!(settings_data.AsynchronousLocation == null)) { // OldSystemAsynchLocation is needed because a disabled input field is not posted td_asynch_location.InnerHtml = "<input type=\"Hidden\" name=\"OldSystemAsynchLocation\" value=\"" + settings_data.AsynchronousLocation + "\">"; td_asynch_location.InnerHtml += "<input type=\"Text\" maxlength=\"255\" name=\"SystemAsynchLocation\" value=\"" + settings_data.AsynchronousLocation + "\""; } else { td_asynch_location.InnerHtml = "<input type=\"Text\" maxlength=\"255\" name=\"SystemAsynchLocation\" value=\"\""; } td_asynch_location.InnerHtml += ">"; td_asynch_location.InnerHtml += "<br/>"; td_asynch_location.InnerHtml += "<span class=\"ektronCaption\">"; td_asynch_location.InnerHtml += m_refMsg.GetMessage("lbl Example Location") + " http://localhost/CMS400Developer/Workarea/webservices/EktronAsyncProcessorWS.asmx"; td_asynch_location.InnerHtml += "</span>"; //PUBLISHPDF and PUBLISHHTML would check this flag. if (settings_data.PublishPdfSupported) { string schk = ""; if (settings_data.PublishPdfEnabled) { schk = " checked "; } PubPdf.Text = "<tr>"; PubPdf.Text += "<td class=\"label shortLabel\">"; PubPdf.Text += "<label for=\"PublishPdfEnabled\">" + m_refMsg.GetMessage("alt Enable office documents to be published in other format") + ":" + "</label>"; PubPdf.Text += "</td>"; PubPdf.Text += "<td class=\"value\">"; PubPdf.Text += "<input type=\"checkbox\" name=\"PublishPdfEnabled\" id=\"PublishPdfEnabled\"" + schk + " >"; PubPdf.Text += "</td>"; PubPdf.Text += "</tr>"; } else { PubPdf.Visible = false; } //LIBRARY FOLDER CREATION if (settings_data.FileSystemSupport) { td_libfolder.InnerHtml = "<input type=\"CHECKBOX\" name=\"filesystemsupport\" value=\"enable_msg\" CHECKED=\"True\" Onclick=\"javascript:return AreYouSure();\">"; } else { td_libfolder.InnerHtml = "<input type=\"CHECKBOX\" name=\"filesystemsupport\" value=\"enable_msg\" Onclick=\"javascript: return AreYouSure()\">"; } //BUILT IN USER //Dim x As System.Web.UI.WebControls.TextBox userid.Value = user_data.Id.ToString(); username.Value = user_data.Username; TD_Pwd.InnerHtml = "<input type=\"password\" value=\"" + user_data.Password + "\" id=\"pwd\" name=\"pwd\" maxlength=\"50\" Onkeypress=\"javascript:return CheckKeyValue(event,\'34\');\">"; TD_Pwd2.InnerHtml = "<input type=\"password\" value=\"" + user_data.Password + "\" id=\"confirmpwd\" name=\"confirmpwd\" maxlength=\"50\" Onkeypress=\"javascript:return CheckKeyValue(event,\'34\');\">"; if ((m_refUserApi.RequestInformationRef.LoginAttempts != -1) && (m_refUserApi.IsAdmin() || m_refUserApi.UserId == 999999999 || (m_refUserApi.IsARoleMember(Ektron.Cms.Common.EkEnumeration.CmsRoleIds.AdminUsers)))) { accountLocked.Text = "<input type=\"checkbox\" id=\"chkAccountLocked\" name=\"chkAccountLocked\" "; if (user_data.IsAccountLocked(m_refUserApi.RequestInformationRef)) { accountLocked.Text += " checked "; } accountLocked.Text += " />"; } else { accountLocked.Text = "<input type=\"hidden\" id=\"chkAccountLocked\" name=\"chkAccountLocked\" "; if (user_data.IsAccountLocked(m_refUserApi.RequestInformationRef)) { accountLocked.Text += " value=\"on\" />"; } else { accountLocked.Text += " value=\"\" />"; } } //styles.Items.Add(New ListItem(m_refMsg.GetMessage("remove styles"), "remove")) //styles.Items.Add(New ListItem(m_refMsg.GetMessage("do not remove styles"), "")) //If (settings_data.RemoveStyles) Then // styles.Items(0).Selected = True //Else // styles.Items(1).Selected = True //End If //styles.Attributes.Add("onClick", "javascript:checkWordStlyes();") //If (settings_data.RemoveStyles) Then // 'jsRemoveStyle = "1" //End If if (settings_data.EnableFontButtons) { font_style.Checked = true; } if (settings_data.PreserveWordStyles) { word_styles.Checked = true; } if (settings_data.PreserveWordClasses) { word_classes.Checked = true; } if (preference_data.Template != "") { templatefilename.Value = preference_data.Template; } if (Convert.ToString(preference_data.FolderId) == "") { chkSmartDesktop.Checked = true; } folderId.Value = preference_data.FolderId; if (preference_data.ForceSetting) { forcePrefs.Checked = true; } //if (preference_data.DisplayTitleText == "1") //{ //disptitletext.Checked = true; //} //txtHeight.Value = Convert.ToString(preference_data.Height) //txtWidth.Value = Convert.ToString(preference_data.Width) if (settings_data.VerifyUserOnAdd) { chkVerifyUserOnAdd.Checked = true; } if (settings_data.EnablePreApproval) { chkEnablePreApproval.Checked = true; } access_def.Value = settings_data.Accessibility; SetAccessibilityRadioButtons(); return (false); } catch { return true; } }