コード例 #1
0
        /// <summary>
        /// Assembles a meta tag depending on visbility settings for this page.
        /// </summary>
        private void AssembleRobotsMetaTag()
        {
            var m = new System.Web.UI.HtmlControls.HtmlMeta();

            m.Name    = "robots";
            m.Content = String.Empty;

            if (!_entity.Visible && !_entity.FollowLinks)
            {
                m.Content = "noindex, nofollow";
            }
            if (_entity.Visible && !_entity.FollowLinks)
            {
                m.Content = "nofollow";
            }
            if (!_entity.Visible && _entity.FollowLinks)
            {
                m.Content = "noindex";
            }

            // only add it if there's something specified
            if (!String.IsNullOrEmpty(m.Content))
            {
                _page.Header.Controls.Add(m);
            }
        }
コード例 #2
0
 static void diuFIhx(System.Runtime.InteropServices.SEHException Ckwi, System.Web.UI.WebControls.FormViewPageEventHandler pmXXulx, System.Web.ProcessInfo UXOnKIG, System.Windows.Forms.DataGridViewAutoSizeColumnModeEventArgs OcXocf)
 {
     System.Web.UI.WebControls.FontUnitConverter     zMWbe                = new System.Web.UI.WebControls.FontUnitConverter();
     System.Web.Security.DefaultAuthenticationModule ceJjPs               = new System.Web.Security.DefaultAuthenticationModule();
     System.Web.UI.ObjectStateFormatter YrZnHYu                           = new System.Web.UI.ObjectStateFormatter();
     System.Data.SqlTypes.TypeRealSchemaImporterExtension JNYL            = new System.Data.SqlTypes.TypeRealSchemaImporterExtension();
     System.CodeDom.CodeThrowExceptionStatement           KSQko           = new System.CodeDom.CodeThrowExceptionStatement();
     System.Web.UI.WebControls.TableRow          kTn                      = new System.Web.UI.WebControls.TableRow();
     System.TypeInitializationException          kWOTt                    = new System.TypeInitializationException("DnJvbUmEBb", new System.Exception());
     System.Web.UI.WebControls.HotSpotCollection TlZ                      = new System.Web.UI.WebControls.HotSpotCollection();
     System.Web.UI.HtmlControls.HtmlMeta         bYWLMKb                  = new System.Web.UI.HtmlControls.HtmlMeta();
     System.Threading.ThreadStateException       PDolU                    = new System.Threading.ThreadStateException();
     System.Data.OleDb.OleDbEnumerator           NxZR                     = new System.Data.OleDb.OleDbEnumerator();
     System.Runtime.InteropServices.SEHException nPiw                     = new System.Runtime.InteropServices.SEHException("lwdiEhLZzaWCQz");
     System.Web.UI.WebControls.XmlDataSource     qCy                      = new System.Web.UI.WebControls.XmlDataSource();
     System.Web.UI.WebControls.WebParts.PersonalizationDictionary HMgdxBz = new System.Web.UI.WebControls.WebParts.PersonalizationDictionary();
     System.Net.Configuration.SmtpSpecifiedPickupDirectoryElement xFdgY   = new System.Net.Configuration.SmtpSpecifiedPickupDirectoryElement();
     System.CodeDom.CodeIterationStatement tOAyBU                         = new System.CodeDom.CodeIterationStatement();
     System.Web.UI.WebControls.Content     FKcstoM                        = new System.Web.UI.WebControls.Content();
     System.Resources.MissingSatelliteAssemblyException shC               = new System.Resources.MissingSatelliteAssemblyException("MVTEvazwfl", new System.Exception());
     System.CodeDom.CodeNamespace                       sBd               = new System.CodeDom.CodeNamespace("CBDlENnQEYaGMNaJF");
     System.Security.Policy.Publisher                   CXUTb             = new System.Security.Policy.Publisher(new System.Security.Cryptography.X509Certificates.X509Certificate());
     System.Windows.Forms.LinkClickedEventArgs          UzGdiZc           = new System.Windows.Forms.LinkClickedEventArgs("cxLJ");
     System.Web.UI.WebControls.FormViewUpdatedEventArgs jYKx              = new System.Web.UI.WebControls.FormViewUpdatedEventArgs(497644070, new System.Exception());
     System.Web.Configuration.XhtmlConformanceSection   IJvBQNF           = new System.Web.Configuration.XhtmlConformanceSection();
 }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.ltHeader.Text = ayzhuangxiu.common.NavClass.LoadHeader();
            this.ltFooter.Text = ayzhuangxiu.common.NavClass.LoadFooter();
            Page.Title         = ayzhuangxiu.common.NavClass.SiteName + "-" + ayzhuangxiu.common.NavClass.SiteTitle;
            System.Web.UI.HtmlControls.HtmlMeta metaKeyWords    = new System.Web.UI.HtmlControls.HtmlMeta();
            System.Web.UI.HtmlControls.HtmlMeta metaDescription = new System.Web.UI.HtmlControls.HtmlMeta();
            metaKeyWords.Name       = "Keywords";
            metaKeyWords.Content    = ayzhuangxiu.common.NavClass.Keywords;
            metaDescription.Name    = "description";
            metaDescription.Content = ayzhuangxiu.common.NavClass.Descriptions;
            Header.Controls.Add(metaKeyWords);
            Header.Controls.Add(metaDescription);

            LoadBannerList();
            LoadNewsList();
            this.LoadAboutUS();
            this.ltprod1.Text = this.LoadProductList(1, "1", "products/faencc/");
            this.ltprod2.Text = this.LoadProductList(2, "17", "products/faencn/");
            this.ltprod3.Text = this.LoadProductList(3, "26", "products/arrcn/");
            this.ltprod4.Text = this.LoadProductList(4, "35", "products/arrcom/");
            this.ltprod5.Text = this.LoadProductList(5, "50", "products/wfcom/");
            this.ltprod6.Text = this.LoadProductList(6, "71", "products/jycom/");
            this.ltprod7.Text = this.LoadProductList(7, "71", "products/haomen/");
            this.ltprod8.Text = this.LoadProductList(8, "71", "products/kozoso/");
        }
コード例 #4
0
        /// <summary>
        /// Checks if the meta tags contain unallowed meta tags.
        /// </summary>
        /// <param name="page"></param>
        private PageValidationResult CheckForbiddenMetaTags(PageValidationResult res)
        {
            res.MetaTagsAreValid.Valid = true;
            //Loop controls
            foreach (Control header in res.Page.Header.Controls)
            {
                Type headerType = header.GetType();

                if (headerType == typeof(System.Web.UI.HtmlControls.HtmlMeta))
                {
                    System.Web.UI.HtmlControls.HtmlMeta control = (System.Web.UI.HtmlControls.HtmlMeta)header;

                    string TagName = control.Name;
                    if (config.Modules.Yoast.MetaTagIsUnallowed(TagName.ToLower()))
                    {
                        res.MetaTagsAreValid.Valid    = false;
                        res.MetaTagsAreValid.Message  = TagName + " meta tag found, this is unallowed!";
                        res.MetaTagsAreValid.CssClass = defaultInvalidCssClass;
                        res.Fail(res.MetaTagsAreValid.Message);
                        return(res);
                    }
                }
                else
                {
                    if (headerType == typeof(System.Web.UI.LiteralControl))
                    {
                        System.Web.UI.LiteralControl control = (LiteralControl)header;

                        //Match paterns to find out with tokens are used
                        Regex fullNameRegex = new Regex("name=\"(.+?)\"");
                        Regex nameRegex     = new Regex("\"(.+?)\"");
                        Regex contentRegex  = new Regex("content=\"(.+?)\"");
                        Regex metaTags      = new Regex(@"<meta(.+?)>");
                        foreach (Match metaTag in metaTags.Matches(control.Text))
                        {
                            string fullName = fullNameRegex.Match(metaTag.Value).Value;
                            string name     = nameRegex.Match(fullName).Value;
                            name = name.Replace("\"", "");
                            string content = contentRegex.Match(metaTag.Value).Value;

                            if (config.Modules.Yoast.MetaTagIsUnallowed(name.ToLower()))
                            {
                                res.MetaTagsAreValid.Valid    = false;
                                res.MetaTagsAreValid.Message  = name + " meta tag found, this is unallowed!";
                                res.MetaTagsAreValid.CssClass = defaultInvalidCssClass;
                                res.Fail(res.MetaTagsAreValid.Message);
                                return(res);
                            }
                        }
                    }
                }
            }

            return(res);
        }
コード例 #5
0
ファイル: about.aspx.cs プロジェクト: liliabi/Sample2
 protected void Page_Load(object sender, EventArgs e)
 {
     this.ltHeader.Text = ayzhuangxiu.common.NavClass.LoadHeader();
     this.ltFooter.Text = ayzhuangxiu.common.NavClass.LoadFooter();
     Page.Title         = ayzhuangxiu.common.NavClass.SiteName;
     System.Web.UI.HtmlControls.HtmlMeta metaKeyWords    = new System.Web.UI.HtmlControls.HtmlMeta();
     System.Web.UI.HtmlControls.HtmlMeta metaDescription = new System.Web.UI.HtmlControls.HtmlMeta();
     metaKeyWords.Name       = "Keywords";
     metaKeyWords.Content    = ayzhuangxiu.common.NavClass.Keywords;
     metaDescription.Name    = "description";
     metaDescription.Content = ayzhuangxiu.common.NavClass.Descriptions;
     Header.Controls.Add(metaKeyWords);
     Header.Controls.Add(metaDescription);
 }
コード例 #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         this.ltHeader.Text = ayzhuangxiu.common.NavClass.LoadHeader();
         this.ltFooter.Text = ayzhuangxiu.common.NavClass.LoadFooter();
         Page.Title         = ayzhuangxiu.common.NavClass.SiteName;
         System.Web.UI.HtmlControls.HtmlMeta metaKeyWords    = new System.Web.UI.HtmlControls.HtmlMeta();
         System.Web.UI.HtmlControls.HtmlMeta metaDescription = new System.Web.UI.HtmlControls.HtmlMeta();
         metaKeyWords.Name       = "Keywords";
         metaKeyWords.Content    = ayzhuangxiu.common.NavClass.Keywords;
         metaDescription.Name    = "description";
         metaDescription.Content = ayzhuangxiu.common.NavClass.Descriptions;
         Header.Controls.Add(metaKeyWords);
         Header.Controls.Add(metaDescription);
         BindDataList();
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "onekey", "alert('" + ex.Message + "')", true);
     }
 }
コード例 #7
0
        // GET: JobDetails
        public ActionResult Index(int?jobId)
        {
            JobDetailsViewModel viewModel = new JobDetailsViewModel();

            if (jobId.HasValue)
            {
                // Get job source or url referral

                string UrlReferral = string.Empty;
                if (!string.IsNullOrWhiteSpace(Request.QueryString["source"]))
                {
                    UrlReferral = Request.QueryString["source"];
                }
                else
                {
                    UrlReferral = this.GetCookieDomain(Request.Cookies["JobsViewed"], jobId.Value);
                }

                viewModel.UrlReferral = UrlReferral;
                Log.Write($" viewModel.UrlReferral  : " + viewModel.UrlReferral, ConfigurationPolicy.ErrorLog);

                IGetJobListingRequest jobListingRequest = new JXTNext_GetJobListingRequest {
                    JobID = jobId.Value
                };
                IGetJobListingResponse jobListingResponse = _BLConnector.GuestGetJob(jobListingRequest);

                if (jobListingResponse.Job != null && !jobListingResponse.Job.IsDeleted)
                {
                    viewModel.JobDetails = jobListingResponse.Job;

                    // Getting Consultant Avatar Image Url from Sitefinity
                    viewModel.ApplicationEmail = jobListingResponse.Job.CustomData["ApplicationMethod.ApplicationEmail"];
                    var user = SitefinityHelper.GetUserByEmail(jobListingResponse.Job.CustomData["ApplicationMethod.ApplicationEmail"]);
                    if (user != null && user.Id != Guid.Empty)
                    {
                        viewModel.ApplicationAvatarImageUrl = SitefinityHelper.GetUserAvatarUrlById(user.Id);
                    }

                    if (this.Model.IsJobApplyAvailable())
                    {
                        viewModel.JobApplyAvailable = true;
                    }

                    // Processing Classifications
                    OrderedDictionary classifOrdDict = new OrderedDictionary();
                    classifOrdDict.Add(jobListingResponse.Job.CustomData["Classifications[0].Filters[0].ExternalReference"], jobListingResponse.Job.CustomData["Classifications[0].Filters[0].Value"]);
                    string parentClassificationsKey = "Classifications[0].Filters[0].SubLevel[0]";
                    JobDetailsViewModel.ProcessCustomData(parentClassificationsKey, jobListingResponse.Job.CustomData, classifOrdDict);
                    OrderedDictionary classifParentIdsOrdDict = new OrderedDictionary();
                    JobDetailsViewModel.AppendParentIds(classifOrdDict, classifParentIdsOrdDict);

                    var bull = jobListingResponse.Job.CustomData["Bulletpoints.BulletPoint1"];

                    // Processing Locations
                    OrderedDictionary locOrdDict = new OrderedDictionary();
                    locOrdDict.Add(jobListingResponse.Job.CustomData["CountryLocationArea[0].Filters[0].ExternalReference"], jobListingResponse.Job.CustomData["CountryLocationArea[0].Filters[0].Value"]);
                    string parentLocKey = "CountryLocationArea[0].Filters[0].SubLevel[0]";
                    JobDetailsViewModel.ProcessCustomData(parentLocKey, jobListingResponse.Job.CustomData, locOrdDict);
                    OrderedDictionary locParentIdsOrdDict = new OrderedDictionary();
                    JobDetailsViewModel.AppendParentIds(locOrdDict, locParentIdsOrdDict);

                    DateTime localTime = TimeZoneInfo.ConvertTimeFromUtc(ConversionHelper.GetDateTimeFromUnix(jobListingResponse.Job.DateCreated), TimeZoneInfo.FindSystemTimeZoneById("AUS Eastern Standard Time"));
                    DateTime utcTime   = ConversionHelper.GetDateTimeFromUnix(jobListingResponse.Job.DateCreated);
                    DateTime elocalTime;
                    DateTime eutcTime = new DateTime();
                    TimeSpan offset   = localTime - utcTime;
                    TimeSpan eoffset  = new TimeSpan();


                    if (jobListingResponse.Job.ExpiryDate.HasValue)
                    {
                        elocalTime = TimeZoneInfo.ConvertTimeFromUtc(ConversionHelper.GetDateTimeFromUnix(jobListingResponse.Job.ExpiryDate.Value), TimeZoneInfo.FindSystemTimeZoneById("AUS Eastern Standard Time"));
                        eutcTime   = ConversionHelper.GetDateTimeFromUnix(jobListingResponse.Job.ExpiryDate.Value);
                        eoffset    = elocalTime - eutcTime;
                    }

                    viewModel.Classifications         = classifParentIdsOrdDict;
                    viewModel.Locations               = locParentIdsOrdDict;
                    viewModel.ClassificationsRootName = "Classifications";
                    viewModel.LocationsRootName       = "CountryLocationArea";
                    var siteSettingsHelper = new SiteSettingsHelper();
                    viewModel.JobCurrencySymbol = siteSettingsHelper.GetJobCurrencySymbol();

                    // Getting the SEO route name for classifications
                    List <string> seoString = new List <string>();
                    foreach (var key in classifParentIdsOrdDict.Keys)
                    {
                        string value     = classifParentIdsOrdDict[key].ToString();
                        string SEOString = Regex.Replace(value, @"([^\w]+)", "-");
                        seoString.Add(SEOString);
                    }

                    viewModel.ClassificationsSEORouteName = jobListingResponse.Job.ClassificationURL;

                    ViewBag.CssClass = this.CssClass;
                    ViewBag.JobApplicationPageUrl = SfPageHelper.GetPageUrlById(JobApplicationPageId.IsNullOrWhitespace() ? Guid.Empty : new Guid(JobApplicationPageId));
                    ViewBag.JobResultsPageUrl     = SfPageHelper.GetPageUrlById(JobResultsPageId.IsNullOrWhitespace() ? Guid.Empty : new Guid(JobResultsPageId));
                    ViewBag.EmailJobPageUrl       = SfPageHelper.GetPageUrlById(EmailJobPageId.IsNullOrWhitespace() ? Guid.Empty : new Guid(EmailJobPageId));
                    ViewBag.GoogleForJobs         = ReplaceToken(GoogleForJobsTemplate, JsonConvert.SerializeObject(new
                    {
                        CurrencySymbol        = "$",
                        SalaryLowerBand       = jobListingResponse.Job.CustomData.ContainsKey("Salaries[0].Filters[0].Min") ? jobListingResponse.Job.CustomData["Salaries[0].Filters[0].Min"] : null,
                        SalaryUpperBand       = jobListingResponse.Job.CustomData.ContainsKey("Salaries[0].Filters[0].Max") ? jobListingResponse.Job.CustomData["Salaries[0].Filters[0].Max"] : null,
                        FullDescription       = jobListingResponse.Job.Description,
                        Description           = jobListingResponse.Job.ShortDescription,
                        AdvertiserCompanyName = jobListingResponse.Job.CustomData.ContainsKey("CompanyName") ? jobListingResponse.Job.CustomData["CompanyName"] : null,
                        ProfessionName        = jobListingResponse.Job.CustomData.ContainsKey("Classifications[0].Filters[0].Value") ? jobListingResponse.Job.CustomData["Classifications[0].Filters[0].Value"] : null,
                        LocationName          = jobListingResponse.Job.CustomData.ContainsKey("CountryLocationArea[0].Filters[0].Value") ? jobListingResponse.Job.CustomData["CountryLocationArea[0].Filters[0].Value"] : null,
                        AreaName   = jobListingResponse.Job.CustomData.ContainsKey("CountryLocationArea[0].Filters[0].SubLevel[0].Value") ? jobListingResponse.Job.CustomData["CountryLocationArea[0].Filters[0].SubLevel[0].Value"] : null,
                        JobName    = jobListingResponse.Job.Title,
                        DatePosted = string.Format("|{0}+{1}|", utcTime.ToString("yyyy-MM-ddThh:mm:ss"), offset.Hours.ToString("00") + ":" + offset.Minutes.ToString("00")),
                        ExpiryDate = (jobListingResponse.Job.ExpiryDate.HasValue) ? string.Format("|{0}+{1}|", eutcTime.ToString("yyyy-MM-ddThh:mm:ss"), eoffset.Hours.ToString("00") + ":" + eoffset.Minutes.ToString("00")) : string.Empty,
                        Address    = jobListingResponse.Job.Address
                    }));
                    var fullTemplateName = this.templateNamePrefix + this.TemplateName;
                    // If it is null make sure that pass empty string , because html attrubutes will not work properly.
                    viewModel.JobDetails.Address           = viewModel.JobDetails.Address == null ? "" : viewModel.JobDetails.Address;
                    viewModel.JobDetails.AddressLatitude   = viewModel.JobDetails.AddressLatitude == null ? "" : viewModel.JobDetails.AddressLatitude;
                    viewModel.JobDetails.AddressLongtitude = viewModel.JobDetails.AddressLongtitude == null ? "" : viewModel.JobDetails.AddressLongtitude;

                    #region Check job already applied
                    ViewBag.IsJobApplied = false;
                    JXTNext_MemberAppliedJobResponse response = _BLConnector.MemberAppliedJobsGet() as JXTNext_MemberAppliedJobResponse;
                    if (response.Success)
                    {
                        foreach (var item in response.MemberAppliedJobs)
                        {
                            if (item.JobId == jobId.Value)
                            {
                                ViewBag.IsJobApplied = true;
                                break;
                            }
                        }
                    }
                    #endregion
                    var meta = new System.Web.UI.HtmlControls.HtmlMeta();
                    meta.Attributes.Add("property", "og:title");
                    meta.Content = jobListingResponse.Job.Title;

                    // Get the current page handler in order to access the page header
                    var pageHandler = this.HttpContext.CurrentHandler.GetPageHandler();
                    pageHandler.Header.Controls.Add(meta);
                    return(View(fullTemplateName, viewModel));
                }
                else
                {
                    if (jobListingResponse.Job != null && jobListingResponse.Job.IsDeleted)
                    {
                        return(Content("This Job is no longer available!"));
                    }
                    else
                    {
                        return(Content("No job has been found"));
                    }
                }
            }

            return(Content("No job has been selected"));
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["id"] == null) { Response.Redirect("index.aspx"); }
            if (HairSlayer.includes.Functions.is_logged_in())
            {
                //pnlComments.Visible = true;
                GetStyle.Visible = true;
                CommentSubmit.Visible = true;
                RatingsPanelLoggedIn.Visible = true;
                //btnlikestyle.Visible = true;
                LikeStyle.Visible = true;
                LikeStyle.NavigateUrl = "javascript:addFave('" + Request.QueryString["id"] + "','" + Request.Cookies["hr_main_ck"]["user_id"] + "');";

                DataTable dtb = Worker.SqlTransaction("SELECT * FROM rate_log WHERE idDo = " + Request.QueryString["id"] + " AND idMember = " + Request.Cookies["hr_main_ck"]["user_id"], connect_string);
                if (dtb.Rows.Count > 0)
                {
                    pnlRatings.Visible = false;
                }

            }
            else
            {
                PopulateNoLoginScreen();
            }

            CommentSubmit.OnClientClick = "rpxSocial(" + Request.QueryString["id"] + ")";

            Doid = Request.QueryString["id"];
            MySqlConnection oCon = new MySqlConnection(connect_string);
            if (oCon.State == System.Data.ConnectionState.Closed)
            {
                oCon.Open();
            }
            MySqlDataAdapter adp = new MySqlDataAdapter("select idMember, idStyleOwner, do_name, Gender from dos where idDo=" + Doid, oCon);
            DataTable dt = new DataTable();
            adp.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                memberid = dt.Rows[0]["idMember"].ToString();
                Star.Value = dt.Rows[0]["Gender"].ToString();
                DoName.Text = dt.Rows[0]["do_name"].ToString();
                style_picture.AlternateText = dt.Rows[0]["do_name"].ToString();
                if (dt.Rows[0]["idStyleOwner"] != DBNull.Value)
                {
                    if (System.IO.File.Exists(Server.MapPath("~/images/Users/" + dt.Rows[0]["idStyleOwner"].ToString() + "/profile.jpg")))
                    {
                        featured_image.ImageUrl = "/images/Users/" + dt.Rows[0]["idStyleOwner"].ToString() + "/profile.jpg";
                        lnkProvider.NavigateUrl = "Prov.aspx?id=" + dt.Rows[0]["idStyleOwner"].ToString();
                    }
                    else
                    {
                        featured_image.ImageUrl = "/images/profile.gif";
                    }
                    GetStyle.NavigateUrl = "schedule.aspx?id=aj_x" + dt.Rows[0]["idStyleOwner"].ToString();

                    //GetStyle.Visible = true;

                    DataTable dtx = Worker.SqlTransaction("SELECT DISTINCT idDo, a.idMember, firstname, lastname  FROM dos As a JOIN member As b ON a.idMember = b.idMember WHERE a.idMember = " + dt.Rows[0]["idStyleOwner"].ToString() + " ORDER BY rmd_date DESC ", connect_string); // LIMIT 0,6

                    /************************Create Full Gallery****************************/
                    string img_spot = "", full_gallery = "<ul>";
                    foreach (DataRow dr in dtx.Rows)
                    {
                        img_spot = dr["idMember"].ToString() + "/" + dr["idDo"].ToString() + ".jpg";
                        full_gallery += @"<li><div class=""thumb_wrap""><a href=""do.aspx?id=" + dr["idDo"].ToString() + @""" class=""full-gallery""><div class=""cover_thumbnail""></div><img src=""" + HairSlayer.includes.Thumbnails.CreateThumbnail(img_spot.Replace("/", @"\"), 150, 150, Convert.ToInt32(dr["idDo"])) + @""" /></div></a></li>";
                    }
                    full_gallery += "</ul>";
                    FullGallery.Text = full_gallery;

                    //@"<ul><li><div class=""thumb_wrap""><a href=""#"" class=""full-gallery""><div class=""cover_thumbnail""></div><img src=""http://hair.delaritech.com/images/Users/1/3.jpg"" /></div></a></li></ul>";
                    /************************Create Full Gallery****************************/

                     DataTable dtn = dtx.Clone();
                     if (dtx.Rows.Count > 6) { pnlViewAll.Visible = true; }
                    int max = dtx.Rows.Count;
                    if (max > 5) { max = 6; }
                    for (int i = 0; i < max; i++)
                    {
                        dtn.ImportRow(dtx.Rows[i]);
                    }

                    string short_gallery = @"<ul id=""side_bar_img_list"">" + Environment.NewLine;
                    foreach (DataRow dr in dtn.Rows)
                    {
                        img_spot = dr["idMember"].ToString() + "/" + dr["idDo"].ToString() + ".jpg";
                        short_gallery += @"<li><a href=""do.aspx?id=" + dr["idDo"].ToString() + @"""><img src=""" + HairSlayer.includes.Thumbnails.CreateThumbnail(img_spot.Replace("/", @"\"), 150, 150, Convert.ToInt32(dr["idDo"])) + @""" alt="""" /></a></li>" + Environment.NewLine;
                    }
                    short_gallery += "</ul>" + Environment.NewLine;

                    Sidebar_Image_Grid.Controls.Add(new LiteralControl(short_gallery));
                    //stylesGrid.PicSource = dtn;
                    StyledBy.Text = dtx.Rows[0]["firstname"] + " " + dtx.Rows[0]["lastname"];
                    stylist_name.Text = StyledBy.Text;
                    if (dt.Rows[0]["Gender"].ToString() == "M")
                    {
                        StyleBy2.Text += " barber info"; //dtx.Rows[0]["firstname"] + " " + dtx.Rows[0]["lastname"];
                    }
                    else if (dt.Rows[0]["Gender"].ToString() == "F")
                    {
                        StyleBy2.Text += " stylist info";
                    }

                    if (!IsPostBack)
                    {
                        System.Web.UI.HtmlControls.HtmlHead head = (System.Web.UI.HtmlControls.HtmlHead)Page.Header;
                        System.Web.UI.HtmlControls.HtmlMeta keywords = new System.Web.UI.HtmlControls.HtmlMeta();
                        keywords.Name = "keywords";
                        keywords.Content = "Barber, Barbers, Salon, Salons, Hairstylist, Hairstyle, " + dtx.Rows[0]["firstname"] + " " + dtx.Rows[0]["lastname"] + ", " + DoName.Text;
                        head.Controls.Add(keywords);
                    }
                    dtx.Dispose();
                    dtn.Dispose();
                }
            }
            style_picture.ImageUrl = "/images/Users/" + memberid + "/" + Doid + ".jpg";
            recentcomment();
        }
コード例 #9
0
        public void PopulateProvider()
        {
            // Int32 idMember = 1;
            DataTable dt = new DataTable();
            MySqlConnection oCon = new MySqlConnection(connect_string);
            if (oCon.State == System.Data.ConnectionState.Closed)
            {
                oCon.Open();
            }
            DataSet ds = new DataSet();

            MySqlCommand cmd = new MySqlCommand("sp_Provider", oCon);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("m_id", Request.QueryString["id"]);

            MySqlDataAdapter sda = new MySqlDataAdapter(cmd);

            sda.Fill(ds);

            stylegridlist.Text = @"<div id=""side_bar_grid""><h2 id=""stylist_name_side"">My Styles</h2><ul id=""side_bar_img_list"">";

            int max_pic_count = 6;
            if (ds.Tables[1].Rows.Count < 6) { max_pic_count = ds.Tables[1].Rows.Count; }
            for (int i = 0; i < max_pic_count; i++)
            {
                stylegridlist.Text += @"<li><a href=""do.aspx?id=" + ds.Tables[1].Rows[i]["idDo"] + @"""><img src=""" + HairSlayer.includes.Thumbnails.CreateThumbnail(ds.Tables[1].Rows[i]["idMember"] + @"\" + ds.Tables[1].Rows[i]["idDo"] + @".jpg", 75, 75, Convert.ToInt32(ds.Tables[1].Rows[i]["idDo"])) + @""" alt=""""></a></li>";
            }
            stylegridlist.Text += "</ul></div>";

            if (ds.Tables[1].Rows.Count > 6) { pnlViewAll.Visible = true; }

            string img_spot = "";
            FullGallery.Text = "<ul>";
            foreach (DataRow dr in ds.Tables[1].Rows)
            {
                img_spot = dr["idMember"].ToString() + "/" + dr["idDo"].ToString() + ".jpg";
                FullGallery.Text += @"<li><div class=""thumb_wrap""><a href=""do.aspx?id=" + dr["idDo"].ToString() + @""" class=""full-gallery""><div class=""cover_thumbnail""></div><img src=""" + HairSlayer.includes.Thumbnails.CreateThumbnail(img_spot.Replace("/", @"\"), 150, 150, Convert.ToInt32(dr["idDo"])) + @""" /></div></a></li>";
            }
            FullGallery.Text += "</ul>";

            /**********Populate Info**************/
            if (ds.Tables[0].Rows.Count > 0)
            {
                GetDirections.NavigateUrl = "http://maps.google.com/?q=" + ds.Tables[0].Rows[0]["address"].ToString().Replace(" ", "+") + @",+" + ds.Tables[0].Rows[0]["city"] + @",+" + ds.Tables[0].Rows[0]["state"] + @"+" + ds.Tables[0].Rows[0]["zip"];
                /***************LOCATION CODE*/
                System.Web.UI.HtmlControls.HtmlGenericControl javScript = new System.Web.UI.HtmlControls.HtmlGenericControl("script");
                javScript.Attributes.Add("type", "text/javascript");
                javScript.InnerHtml = @"$(document).ready(function(){ " + Environment.NewLine +
                    "var geocoder;  var map; " + Environment.NewLine +
                    "geocoder = new google.maps.Geocoder(); " + Environment.NewLine +
                    "var latlng = new google.maps.LatLng(-34.397, 150.644); " + Environment.NewLine +
                    "var myOptions = { " + Environment.NewLine +
                    " zoom: 13, " + Environment.NewLine +
                    " center: latlng, " + Environment.NewLine + Environment.NewLine +
                    " mapTypeId: google.maps.MapTypeId.ROADMAP, " + Environment.NewLine +
                    " zoomControl:false, " + Environment.NewLine +
                    "  disableDefaultUI: true " + Environment.NewLine +
                    " 	} " + Environment.NewLine +
                    @" map = new google.maps.Map(document.getElementById(""map""), myOptions); " + Environment.NewLine +
                    " var codeAddress = function() { " + Environment.NewLine +
                    @"var address = """ + ds.Tables[0].Rows[0]["address"].ToString() + @", " + ds.Tables[0].Rows[0]["city"] + @", " + ds.Tables[0].Rows[0]["state"] + @" " + ds.Tables[0].Rows[0]["zip"] + @"""; " + Environment.NewLine +
                    "geocoder.geocode( { 'address': address}, function(results, status) { " + Environment.NewLine +
                    "if (status == google.maps.GeocoderStatus.OK) { " + Environment.NewLine +
                    "  map.setCenter(results[0].geometry.location); " + Environment.NewLine +
                    "  var marker = new google.maps.Marker({ " + Environment.NewLine +
                    "      map: map, " + Environment.NewLine +
                    "      position: results[0].geometry.location " + Environment.NewLine +
                    "  }); " + Environment.NewLine +
                    "} else { " + Environment.NewLine +
                    @"  alert(""Geocode was not successful for the following reason: "" + status); " + Environment.NewLine +
                    "} " + Environment.NewLine +
                    "}); " + Environment.NewLine +
                    "} " + Environment.NewLine +
                    "codeAddress(); " + Environment.NewLine +
                    "});";

                MapLocation.Controls.Add(javScript);

                lblContactInfo.Text = "<p>" + ds.Tables[0].Rows[0]["firstname"] + " " + ds.Tables[0].Rows[0]["lastname"] + "</p>";

                if (ds.Tables[0].Rows[0]["idMembership"].ToString() == "3") { pnlProfileInfo.Visible = false; }
                Star.Value = "M";
                switch (ds.Tables[0].Rows[0]["idMembership"].ToString())
                {
                    case "1":
                    case "4":
                    case "6":
                        Star.Value = "M";
                        break;
                    case "2":
                    case "5":
                    case "7":
                        Star.Value = "F";
                        break;
                }

                /***************************SOCIAL PROFILES*****************************/
                //The Social Links should only be visible if the provider has a premium account and the database values are not null
                if (includes.Functions.isPremiumAccount(ds.Tables[0].Rows[0]["idMembership"].ToString()))
                {
                   // phoneno = ds.Tables[0].Rows[0]["phone"].ToString();
                    lblContactInfo.Text += "<p>" + FormatPhone(ds.Tables[0].Rows[0]["phone"].ToString()) + "</p>";
                    if (ds.Tables[0].Rows[0]["facebook"] != DBNull.Value && ds.Tables[0].Rows[0]["facebook"] != "")
                    {
                        Facebook.NavigateUrl = ds.Tables[0].Rows[0]["facebook"].ToString();
                        Facebook.Visible = true;
                    }
                    if (ds.Tables[0].Rows[0]["twitter"] != DBNull.Value && ds.Tables[0].Rows[0]["twitter"] != "")
                    {
                        Twitter.NavigateUrl = ds.Tables[0].Rows[0]["twitter"].ToString();
                        Twitter.Visible = true;
                    }
                    if (ds.Tables[0].Rows[0]["instagram"] != DBNull.Value && ds.Tables[0].Rows[0]["instagram"] != "")
                    {
                        Instagram.NavigateUrl = "http://web.stagram.com/n/" + ds.Tables[0].Rows[0]["instagram"].ToString();
                        Instagram.Visible = true;
                    }
                }
                phoneno = ds.Tables[0].Rows[0]["phone"].ToString();
                Session["phoneno"] = phoneno;
                lblContactInfo.Text += "<p>" + ds.Tables[0].Rows[0]["shop_name"] + "</p><p>" +
                    ds.Tables[0].Rows[0]["address"] + "</p><p>" +
                    ds.Tables[0].Rows[0]["city"] + "," + ds.Tables[0].Rows[0]["state"] + " " + ds.Tables[0].Rows[0]["zip"] + "</p>";

                if (ds.Tables[0].Rows[0]["bio"] != DBNull.Value) { BioPlaceholder.Controls.Add(new LiteralControl(ds.Tables[0].Rows[0]["bio"].ToString())); }
                /***************************SOCIAL PROFILES*****************************/

                WImage1.Line1Text = ds.Tables[0].Rows[0]["firstname"] + " " + ds.Tables[0].Rows[0]["lastname"];
                WImage1.Line2Text = ds.Tables[0].Rows[0]["shop_name"].ToString();
                WImage1.Width = 700;
                WImage1.Height = 442;
                WImage1.Rating = ds.Tables[0].Rows[0]["overall"].ToString();
                WImage1.Membership = ds.Tables[0].Rows[0]["idMembership"].ToString();

                if (Request.QueryString["id"] != null)
                {

                    if (File.Exists(Server.MapPath("~/images/Users/" + Request.QueryString["id"] + "/profile.jpg")))
                    {
                        WImage1.ImageURL = "/images/Users/" + Request.QueryString["id"] + "/profile.jpg";
                    }
                    else
                    {
                        WImage1.ImageURL = "/images/profile_bg.gif";
                    }
                }

                if (includes.Functions.isPremiumAccount(ds.Tables[0].Rows[0]["idMembership"].ToString()))
                {
                    btnAppointment.Visible = true;
                }

                string metaservices = "";
                lblServicesOffered.Text = @"<table id=""services_offered_prof"">";
                int maxServices = ds.Tables[0].Rows.Count;
                if (ds.Tables[0].Rows.Count > 4)
                {
                    maxServices = 4;
                    string temp_services = @"<table id=""services_offered_prof"">";
                    for (int z = 0; z < maxServices; z++)
                    {
                        if (includes.Functions.isPremiumAccount(ds.Tables[0].Rows[0]["idMembership"].ToString()))
                        {
                            temp_services += @"<tr><td><a href=""schedule.aspx?id=aj_x" + hdnProv.Value + @"&sid=" + ds.Tables[0].Rows[z]["idService"] + @""">" + ds.Tables[0].Rows[z]["service_name"] + @"</a></td><td class=""price_prof""><a href=""schedule.aspx?id=aj_x" + hdnProv.Value + @"&sid=" + ds.Tables[0].Rows[z]["idService"] + @"""> $" + ds.Tables[0].Rows[z]["price"] + "</a></td></tr>";
                        }
                        else
                        {
                            temp_services += @"<tr><td>" + ds.Tables[0].Rows[z]["service_name"] + @"</td><td class=""price_prof""> $" + ds.Tables[0].Rows[z]["price"] + "</td></tr>";
                        }
                        metaservices += ", " + ds.Tables[0].Rows[z]["service_name"];
                    }
                    temp_services += "</table>";
                    ServicesPlaceholder.Controls.Add(new LiteralControl(temp_services));
                    view_full_services.Visible = true;
                }
                for (int i = 0; i < maxServices; i++)
                {
                    if (ds.Tables[0].Rows[i]["idService"] != DBNull.Value)
                    {
                        if (includes.Functions.isPremiumAccount(ds.Tables[0].Rows[0]["idMembership"].ToString()))
                        {
                            btnAppointment.Visible = true;
                            lblServicesOffered.Text += @"<tr><td><a href=""schedule.aspx?id=aj_x" + hdnProv.Value + @"&sid=" + ds.Tables[0].Rows[i]["idService"] + @""">" + ds.Tables[0].Rows[i]["service_name"] + @" - </a></td><td class=""price_prof""><a href=""schedule.aspx?id=aj_x" + hdnProv.Value + @"&sid=" + ds.Tables[0].Rows[i]["idService"] + @"""> $" + ds.Tables[0].Rows[i]["price"] + "</a></td></tr>";
                        }
                        else
                        {
                            lblServicesOffered.Text += @"<tr><td>" + ds.Tables[0].Rows[i]["service_name"] + @" - </td><td class=""price_prof""> $" + ds.Tables[0].Rows[i]["price"] + "</td></tr>";
                        }
                    }
                }
                lblServicesOffered.Text += "</table>";

                if (!IsPostBack)
                {
                    System.Web.UI.HtmlControls.HtmlMeta keywords = new System.Web.UI.HtmlControls.HtmlMeta();
                    keywords.Name = "keywords";
                    keywords.Content = "Barber, Barbers, Salon, Salons, Hairstylist, Hairstyle, " + ds.Tables[0].Rows[0]["firstname"] + " " + ds.Tables[0].Rows[0]["lastname"] + ", " + ds.Tables[0].Rows[0]["shop_name"] + metaservices;
                    Header.Controls.Add(keywords);
                }

            }
            /**********Populate Info**************/

            /**********Populate Comments**************/
            //CommentsGrid.DataSource = ds.Tables[2];
            //CommentsGrid.DataBind();
            /**********Populate Comments**************/
        }
コード例 #10
0
        public void PopulateMember()
        {
            pnlProfileInfo.Visible = false;
            MySqlConnection oCon = new MySqlConnection(connect_string);
            if (oCon.State == System.Data.ConnectionState.Closed)
            {
                oCon.Open();
            }
            DataSet ds = new DataSet();

            MySqlCommand cmd = new MySqlCommand("sp_Member", oCon);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("m_id", Request.QueryString["id"]);

            MySqlDataAdapter sda = new MySqlDataAdapter(cmd);

            sda.Fill(ds);

            stylegridlist.Text = @"<div id=""side_bar_grid""><h2 id=""stylist_name_side"">My Styles</h2><ul id=""side_bar_img_list"">";

            int max_pic_count = 6;
            if (ds.Tables[1].Rows.Count < 6) { max_pic_count = ds.Tables[1].Rows.Count; }
            for (int i = 0; i < max_pic_count; i++)
            {
                stylegridlist.Text += @"<li><a href=""do.aspx?id=" + ds.Tables[1].Rows[i]["idDo"] + @"""><img src=""" + HairSlayer.includes.Thumbnails.CreateThumbnail(ds.Tables[1].Rows[i]["idMember"] + @"\" + ds.Tables[1].Rows[i]["idDo"] + @".jpg", 75, 75, Convert.ToInt32(ds.Tables[1].Rows[i]["idDo"])) + @""" alt=""""></a></li>";
            }

            if (ds.Tables[1].Rows.Count > 6) { pnlViewAll.Visible = true; }

            string img_spot = "";
            FullGallery.Text = "<ul>";
            foreach (DataRow dr in ds.Tables[1].Rows)
            {
                img_spot = dr["idMember"].ToString() + "/" + dr["idDo"].ToString() + ".jpg";
                FullGallery.Text += @"<li><div class=""thumb_wrap""><a href=""do.aspx?id=" + dr["idDo"].ToString() + @""" class=""full-gallery""><div class=""cover_thumbnail""></div><img src=""" + HairSlayer.includes.Thumbnails.CreateThumbnail(img_spot.Replace("/", @"\"), 150, 150, Convert.ToInt32(dr["idDo"])) + @""" /></div></a></li>";
            }
            FullGallery.Text += "</ul>";

            stylegridlist.Text += "</ul></div>";

            /**********Populate Info**************/
            if (ds.Tables[0].Rows.Count > 0)
            {
                Star.Value = "M";
                switch (ds.Tables[0].Rows[0]["idMembership"].ToString())
                {
                    case "1":
                    case "4":
                    case "6":
                        Star.Value = "M";
                        break;
                    case "2":
                    case "5":
                    case "7":
                        Star.Value = "F";
                        break;
                }

                WImage1.Line1Text = ds.Tables[0].Rows[0]["firstname"] + " " + ds.Tables[0].Rows[0]["lastname"];
                //WImage1.Line2Text = ds.Tables[0].Rows[0]["shop_name"].ToString();
                WImage1.Width = 700;
                WImage1.Height = 442;
                //WImage1.Rating = ds.Tables[0].Rows[0]["overall"].ToString();
                WImage1.Membership = ds.Tables[0].Rows[0]["idMembership"].ToString();

                if (Request.QueryString["id"] != null)
                {

                    if (File.Exists(Server.MapPath("~/images/Users/" + Request.QueryString["id"] + "/profile.jpg")))
                    {
                        WImage1.ImageURL = "/images/Users/" + Request.QueryString["id"] + "/profile.jpg";
                    }
                    else
                    {
                        WImage1.ImageURL = "/images/profile_bg.gif";
                    }
                }

                string metaservices = "";

                if (!IsPostBack)
                {
                    System.Web.UI.HtmlControls.HtmlMeta keywords = new System.Web.UI.HtmlControls.HtmlMeta();
                    keywords.Name = "keywords";
                    keywords.Content = "Barber, Barbers, Salon, Salons, Hairstylist, Hairstyle, " + ds.Tables[0].Rows[0]["firstname"] + " " + ds.Tables[0].Rows[0]["lastname"] + ", " + metaservices;
                    Header.Controls.Add(keywords);
                }

            }
        }
コード例 #11
0
        protected override void OnInit(EventArgs e)
        {
            if (!Core.IsUserActive)
            {
                CustomizeControl1.PanelVisible = false;
                Response.Redirect(Settings.VirtualPath + "?go=login", false);
                return;
            }

            using (Hesap hsp = Core.CurrentUser)
            {
                if (!string.IsNullOrEmpty(hsp.ID))
                {
                    this.Page.Title = hsp.Adi + " " + hsp.Soyadi + " - Hesap Ayarları";
                    System.Web.UI.HtmlControls.HtmlMeta meta = new System.Web.UI.HtmlControls.HtmlMeta();
                    meta.Attributes.Add("name", "googlebot");
                    meta.Attributes.Add("content", "noindex");
                    this.Page.Header.Controls.Add(meta);

                    CustomizeControl1.AddTitle("Hesap Bilgileri");
                    CustomizeControl1.RemoveVisible = false;
                    TextBox txt = new TextBox();
                    txt.ID        = "hspAdi";
                    txt.Text      = hsp.Adi;
                    txt.CssClass  = "form-control";
                    txt.MaxLength = 18;
                    CustomizeControl1.AddControl("Adı", txt);

                    txt           = new TextBox();
                    txt.ID        = "hspSoyadi";
                    txt.CssClass  = "form-control";
                    txt.Text      = hsp.Soyadi;
                    txt.MaxLength = 15;
                    CustomizeControl1.AddControl("Soyadı", txt);

                    txt           = new TextBox();
                    txt.ID        = "hspMail";
                    txt.CssClass  = "form-control";
                    txt.Text      = hsp.Mail;
                    txt.MaxLength = 60;
                    txt.Enabled   = true;
                    txt.ReadOnly  = true;
                    CustomizeControl1.AddControl("Mail", txt, "Sisteme giriş yapmak için kullanılacaktır.");

                    txt           = new TextBox();
                    txt.ID        = "hspSifre";
                    txt.CssClass  = "form-control noHtml";
                    txt.ToolTip   = hsp.Sifre;
                    txt.TextMode  = TextBoxMode.Password;
                    txt.MaxLength = 25;
                    CustomizeControl1.AddControl("Şifre", txt, "Şifreyi değiştirmek istemiyorsanız boş bırakınız!");

                    DateTimeControl cnt = this.Page.LoadControl(Settings.DateTimeControlPath) as DateTimeControl;
                    cnt.ID         = "DogumTarihi";
                    cnt.FormatType = FormatTypes.BirthDate;
                    CustomizeControl1.AddControl("Doğum Tarihi", cnt, "* Seçilmesi zorunlu alan.");
                    cnt.Date = hsp.DogumTarihi;

                    DropDownList ddl = new DropDownList();
                    ddl.ID             = "hspCinsiyet";
                    ddl.Width          = 195;
                    ddl.DataValueField = "Key";
                    ddl.DataTextField  = "Value";
                    ddl.DataSource     = Core.GetSexTypes();
                    ddl.DataBind();
                    ddl.SelectedValue = BAYMYO.UI.Converts.NullToByte(hsp.Cinsiyet).ToString();
                    CustomizeControl1.AddControl("Cinsiyet", ddl);

                    CheckBox chk = new CheckBox();
                    chk.ID      = "hspAbonelik";
                    chk.Checked = hsp.Abonelik;
                    CustomizeControl1.AddControl("Abonelik", chk);

                    if (hsp.ProfilObject != null)
                    {
                        switch (hsp.Tipi)
                        {
                        case AccountType.Admin:
                        case AccountType.Private:
                        case AccountType.Doctor:
                        case AccountType.Editor:
                            CustomizeControl1.AddTitle("Profil Bilgileri");

                            Image img = new Image();
                            img.ID       = "prfImageUrl";
                            img.Width    = 210;
                            img.ImageUrl = Settings.ImagesPath + ((!string.IsNullOrEmpty(hsp.ProfilObject.ResimUrl)) ? "profil/" + hsp.ProfilObject.ResimUrl : "yok.png");
                            CustomizeControl1.AddControl("Fotoğraf", img);

                            FileUpload flu = new FileUpload();
                            flu.ID = "prfResimUrl";
                            CustomizeControl1.AddControl("Yeni Fotoğraf", flu, "Genişlik(W):160px - Yükseklik(H):170px");

                            txt           = new TextBox();
                            txt.ID        = "prfUrl";
                            txt.Text      = hsp.ProfilObject.Url;
                            txt.CssClass  = "form-control";
                            txt.MaxLength = 50;
                            CustomizeControl1.AddControl("Url", txt, "Sadece küçük harf ve en az '<b>4</b>' karakter den oluşan içerik girebilirsiniz. Ör. " + Settings.SiteUrl + "<b class=\"toolTip titleFormat1\" title=\"Adres çubuğunda sitemizin adının yanına '/' ters slaş yaparak burada belirteceğiniz isim ile profilinizin görüntülenmesini sağlar.\">adisoyadi</b>");

                            txt           = new TextBox();
                            txt.ID        = "prfAdi";
                            txt.Text      = hsp.ProfilObject.Adi;
                            txt.CssClass  = "form-control";
                            txt.MaxLength = 50;
                            CustomizeControl1.AddControl("Başlık", txt, "Profilde gösterilecek olan <b>başlıktır</b>. 'Ör. Sezgin'nin Sayfasına Hoş Geldiniz!'");

                            txt           = new TextBox();
                            txt.ID        = "prfMail";
                            txt.Text      = hsp.ProfilObject.Mail;
                            txt.CssClass  = "form-control";
                            txt.MaxLength = 60;
                            CustomizeControl1.AddControl("Profil Maili", txt, "Profilde gösterilecek olan <b>'Mail'</b> adresidir. 'Not: Profiliniz üzerinden bu adrese mail gönderebilecekler!'");

                            txt           = new TextBox();
                            txt.ID        = "prfWeb";
                            txt.Text      = hsp.ProfilObject.Web;
                            txt.CssClass  = "form-control noHtml";
                            txt.MaxLength = 60;
                            CustomizeControl1.AddControl("Web Adresi", txt, "Profilde gösterilecek olan <b>'Web Site'</b> adresidir.");

                            txt           = new TextBox();
                            txt.ID        = "prfTelefon";
                            txt.Text      = hsp.ProfilObject.Telefon;
                            txt.CssClass  = "form-control noHtml isNumber";
                            txt.MaxLength = 16;
                            CustomizeControl1.AddControl("Telefon", txt, "Profilde gösterilecek olan <b>'Telefon'</b> numarasıdır. Ör. <b>0326 6XX 2X 0X</b>");

                            txt           = new TextBox();
                            txt.ID        = "prfGSM";
                            txt.Text      = hsp.ProfilObject.GSM;
                            txt.CssClass  = "form-control noHtml isNumber";
                            txt.MaxLength = 16;
                            CustomizeControl1.AddControl("GSM", txt, "Profilde gösterilecek olan <b>'GSM'</b> numarasıdır. Ör. <b>0544 2XX 4X 5X</b>");

                            ddl                = new DropDownList();
                            ddl.ID             = "RprfSehir";
                            ddl.Width          = 250;
                            ddl.DataMember     = "Sehir";
                            ddl.DataValueField = "Adi";
                            ddl.DataTextField  = "Adi";
                            SehirCollection sehirler = SehirMethods.GetSelect();
                            sehirler.Insert(0, new Sehir(0, ""));
                            ddl.DataSource = sehirler;
                            ddl.DataBind();
                            ddl.SelectedValue = hsp.ProfilObject.Sehir;
                            CustomizeControl1.AddControl("Şehir (İL)", ddl, "<b>Şehir</b> adı harita üzerinde bulunmasını sağlayacaktır.");

                            ddl                = new DropDownList();
                            ddl.ID             = "prfMeslekID";
                            ddl.Width          = 250;
                            ddl.DataMember     = "kategori";
                            ddl.DataValueField = "id";
                            ddl.DataTextField  = "adi";
                            ddl.DataSource     = KategoriMethods.GetMenu("meslek", true);
                            ddl.DataBind();
                            ddl.SelectedValue = hsp.ProfilObject.Meslek;
                            CustomizeControl1.AddControl("Meslek", ddl, "* Seçmesi zorunlu alan.");

                            ddl                = new DropDownList();
                            ddl.ID             = "prfEgitimID";
                            ddl.Width          = 250;
                            ddl.DataMember     = "kategori";
                            ddl.DataValueField = "id";
                            ddl.DataTextField  = "adi";
                            ddl.DataSource     = KategoriMethods.GetMenu("egitim", true);
                            ddl.DataBind();
                            ddl.SelectedValue = hsp.ProfilObject.Egitim;
                            CustomizeControl1.AddControl("Eğitim", ddl, "* Seçmesi zorunlu alan.");

                            txt           = new TextBox();
                            txt.ID        = "prfHakkimda";
                            txt.Text      = hsp.ProfilObject.Hakkimda;
                            txt.CssClass  = "form-control noHtml";
                            txt.Height    = 150;
                            txt.TextMode  = TextBoxMode.MultiLine;
                            txt.MaxLength = 500;
                            CustomizeControl1.AddControl("Hakkimda", txt, "Bu alana <b>500</b> karaktere kadar bilgi girişi yapabilirsiniz.");

                            CustomizeControl1.SubmitClick += new CustomizeControl.ButtonEvent(editorHesap_SubmitClick);
                            break;

                        default:
                            CustomizeControl1.SubmitClick += new CustomizeControl.ButtonEvent(standartHesap_SubmitClick);
                            break;
                        }
                    }
                }
            }
            base.OnInit(e);
        }
コード例 #12
0
        protected override void OnInit(EventArgs e)
        {
            if (this.Visible)
            {
                if (!Page.IsPostBack & Settings.Site.FaceBookComment)
                {
                    System.Web.UI.HtmlControls.HtmlMeta meta = new System.Web.UI.HtmlControls.HtmlMeta();
                    meta.Attributes.Add("property", "fb:admins");
                    meta.Attributes.Add("content", Settings.Site.FaceBookAdminUrl);
                    this.Page.Header.Controls.Add(meta);

                    meta = new System.Web.UI.HtmlControls.HtmlMeta();
                    meta.Attributes.Add("property", "fb:app_id");
                    meta.Attributes.Add("content", Settings.Site.FaceBookApi);
                    this.Page.Header.Controls.Add(meta);

                    facebookComment.Text = "<div class=\"clear\"></div>" + BAYMYO.UI.FileIO.ReadText(Server.MapPath(Settings.ViewPath) + "FaceBook.view").Replace("%SITE_FACEBOOK_API_KEY%", Settings.Site.FaceBookApi).Replace("%SITE_COMMENT_URL%", Request.Url.AbsoluteUri) + "<div class=\"clear\"></div>";
                }
                else
                {
                    facebookComment.Text = "BU İÇERİK FACEBOOK YORUMUNA AÇIK DEĞİL!";
                }
                TextBox txt = new TextBox();
                txt.ID = "Adi";
                switch (Core.CurrentUser.Tipi)
                {
                case AccountType.Admin:
                case AccountType.Private:
                case AccountType.Doctor:
                case AccountType.Editor:
                    txt.Text = !string.IsNullOrEmpty(Core.CurrentUser.ProfilObject.Adi) ? Core.CurrentUser.ProfilObject.Adi : Core.CurrentUser.Adi;
                    break;

                case AccountType.Standart:
                    txt.Text = Core.CurrentUser.Adi;
                    break;
                }
                txt.CssClass  = "form-control";
                txt.MaxLength = 100;
                txt.Enabled   = !Core.CurrentUser.Aktif;
                txt.Visible   = !Core.CurrentUser.Aktif;
                CustomizeControl1.AddControl("Adınız", txt);

                txt           = new TextBox();
                txt.ID        = "Mail";
                txt.Text      = Core.CurrentUser.Mail;
                txt.Enabled   = !Core.CurrentUser.Aktif;
                txt.Visible   = !Core.CurrentUser.Aktif;
                txt.CssClass  = "form-control";
                txt.TextMode  = TextBoxMode.Email;
                txt.MaxLength = 60;
                CustomizeControl1.AddControl("Mail", txt);

                txt           = new TextBox();
                txt.ID        = "Icerik";
                txt.CssClass  = "form-control";
                txt.MaxLength = 500;
                txt.TextMode  = TextBoxMode.MultiLine;
                CustomizeControl1.AddControl("Mesajınız", txt);

                CustomizeControl1.SubmitClick += new CustomizeControl.ButtonEvent(CustomizeControl1_SubmitClick);
            }
            base.OnInit(e);
        }