private void DrawProfilesModule() { UserHistory uh = new UserHistory(); List <string> types; types = new List <string>(); hi = uh.GetItems(); if (hi == null) { Response.Redirect(Root.Domain + "/search", true); } foreach (HistoryItem item in hi) { string hiremove; foreach (string s in item.Types) { hiremove = types.Find(delegate(string hiremoveitem) { return(hiremoveitem == s); }); if (hiremove.IsNullOrEmpty()) { types.Add(s); } } } rptHistory.DataSource = types; rptHistory.DataBind(); }
private void DrawProfilesModule() { rptHistory.DataSource = uh.GetItems(5); rptHistory.DataBind(); if (rptHistory.DataSource != null) { litSeeAll.Text = "<a href='" + Root.Domain + "/history'><font style='font-size:10px'>See All (" + uh.GetItems().Count.ToString() + ") pages</font></a>"; } }
private void DrawProfilesModule() { int count = 0; int total = uh.GetItems().Count; lblHistoryItems.Text = "<li class='main-nav'><a href='" + Root.Domain + "/history'>History (" + total.ToString() + ")</a><ul class='drop'>"; foreach (HistoryItem h in uh.GetItems(5)) { lblHistoryItems.Text += "<li><a style='border-left:1px solid #383737;border-right:1px solid #383737;' href='" + h.URI + "'>" + h.ItemLabel + "</a></li>"; count++; } if (total > 1) { lblHistoryItems.Text += "<li style='height:39px !important;'><a style='border-top:1px solid #ffffff;border-bottom:1px solid #383737;border-left:1px solid #383737;border-right:1px solid #383737;' href='" + Root.Domain + "/history'>See All " + total.ToString() + " Pages</a></li></ul></li>"; } else if (total == 1) { lblHistoryItems.Text += "<li style='height:39px !important;'><a style='border-top:1px solid #ffffff;border-bottom:1px solid #383737;border-left:1px solid #383737;border-right:1px solid #383737;' href='" + Root.Domain + "/history'>See All Pages</a></li></ul></li>"; } }
private void DrawProfilesModule() { UserHistory uh = new UserHistory(); List <HistoryItem> hi = uh.GetItems(); if (hi == null) { Response.Redirect(Root.Domain + "/search", true); } rptHistory.DataSource = hi; rptHistory.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (this.RDFData != null) { uh = new UserHistory(); if (this.RDFData.InnerXml != "") { RecordHistory(); } if (uh.GetItems() != null) { DrawProfilesModule(); } else { lblHistoryItems.Text = "<li class='main-nav'><a href='" + Root.Domain + "/history'>History (0)</a></li>"; } } }
private void DrawProfilesModule() { Int64 subject = 0; if (Request.QueryString["subject"] != null) { subject = Convert.ToInt64(Request.QueryString["subject"]); } Utilities.DataIO data = new Profiles.Framework.Utilities.DataIO(); menulist.Append("<ul>"); menulist.Append("<li><a href='" + Root.Domain + "/search'>Find People</a></li>"); menulist.Append("<li><a href='" + Root.Domain + "/search/all'>Find Everything</a></li>"); //-50 is the profiles Admin if (data.GetSessionSecurityGroup() == -50) { menulist.Append("<li><a href='" + Root.Domain + "/SPARQL/default.aspx'>SPARQL Query</a></li>"); } menulist.Append("<li><a href='" + Root.Domain + "/about/default.aspx'>About This Site</a></li>"); if (sm.Session().NodeID > 0) { menulist.Append("<li><a href='" + sm.Session().PersonURI + "'>View My Profile</a></li>"); } menulist.Append("<li><a href='" + Root.Domain + "/login/default.aspx?method=login&edit=true'>Edit My Profile</a></li>"); if (base.MasterPage.CanEdit) { menulist.Append("<li><a href='" + Root.Domain + "/edit/" + subject.ToString() + "'>Edit This Profile</a></li>"); } if (sm.Session().UserID > 0) { menulist.Append("<li><a href='" + Root.Domain + "/proxy/default.aspx?subject=" + sm.Session().NodeID.ToString() + "'>Manage Proxies</a></li>"); } if (base.BaseData.SelectSingleNode(".").OuterXml != string.Empty && !Root.AbsolutePath.ToLower().Contains("/search")) { if (base.BaseData.SelectSingleNode("//rdf:RDF/rdf:Description/@rdf:about", base.Namespaces) != null && !Root.AbsolutePath.ToLower().Contains("proxy")) { string uri = this.BaseData.SelectSingleNode("//rdf:RDF/rdf:Description/@rdf:about", base.Namespaces).Value; //IF the URI is in our system then we build the link. If not then we do not build the link for the data. if (uri.Contains(Root.Domain)) { string file = string.Empty; string spostring = string.Empty; string[] spoarray; spostring = uri.ToLower().Replace(Root.Domain.ToLower() + "/profile/", ""); spoarray = spostring.Split('/'); for (int i = 0; i < spoarray.Length; i++) { file = file + spoarray[i] + "_"; } file = file.Substring(0, file.Length - 1); menulist.Append("<li><a href=\"" + uri + "/" + file + ".rdf\" target=\"_blank\">" + "Export RDF" + "</a> <a style='border: none;' href='" + Root.Domain + "/about/default.aspx?tab=data'><img style='border-style: none' src='" + Root.Domain + "/Framework/Images/info.png' border='0' alt='Help with RDF'></a></li>"); if (base.MasterPage != null) { System.Web.UI.HtmlControls.HtmlContainerControl Head1; Head1 = (System.Web.UI.HtmlControls.HtmlContainerControl)base.MasterPage.FindControl("Head1"); //If a masterpage exists, you need to to create an ASP.Net Literal object and pass it to the masterpage so it can process the link in the Head block. string link = "<link rel=\"alternate\" type=\"application/rdf+xml\" href=\"" + uri + "/" + file + ".rdf\" />"; Head1.Controls.Add(new LiteralControl(link)); } } } } if (sm.Session().UserID == 0) { if (!Root.AbsolutePath.Contains("login")) { menulist.Append("<li><a href='" + Root.Domain + "/login/default.aspx?pin=send&method=login&redirectto=" + Root.Domain + Root.AbsolutePath + "'>Login to Profiles</a></li>"); } } else { menulist.Append("<li><a href='" + Root.Domain + "/login/default.aspx?method=logout&redirectto=" + Root.Domain + Root.AbsolutePath + "'>Logout</a></li>"); } menulist.Append("</ul>"); // hide active networks DIV if not logged in if (sm.Session().UserID > 0) { ActiveNetworkRelationshipTypes.Visible = true; } else { ActiveNetworkRelationshipTypes.Visible = false; } UserHistory uh = new UserHistory(); ProfileHistory.RDFData = base.BaseData; ProfileHistory.PresentationXML = base.MasterPage.PresentationXML; ProfileHistory.Namespaces = base.Namespaces; if (uh.GetItems() != null) { ProfileHistory.Visible = true; } else { ProfileHistory.Visible = false; } panelMenu.InnerHtml = menulist.ToString(); }