//public void Page_Load(object sender, EventArgs e)
        override protected void OnInit(EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            if (Request.UrlReferrer == null || !Request.UrlReferrer.ToString().ToLower().Contains("/search"))
            {
                Session["SEARCHREQUEST"] = null;
                masterpage.SearchRequest = null;
            }

            string tab = string.Empty;


            if (Request.QueryString["searchtype"] == null && Request.Form["searchtype"] != null)
            {
                this.SearchType = Request.Form["searchtype"];
            }
            else if (Request.QueryString["searchtype"] != null && Request.Form["searchtype"] == null)
            {
                this.SearchType = Request.QueryString["searchtype"];
            }



            if (this.SearchType.IsNullOrEmpty())
            {
                this.LoadPresentationXML("searchform");
                if (Request.QueryString["tab"] != null)
                {
                    masterpage.Tab = Request.QueryString["tab"];
                }
                else
                {
                    masterpage.Tab = "";
                }



                masterpage.RDFData       = null;
                masterpage.RDFNamespaces = null;
            }
            else
            {
                if (Request.QueryString["tab"] != null)
                {
                    masterpage.Tab = Request.QueryString["tab"];
                }
                else
                {
                    masterpage.Tab = "";
                }

                this.LoadPresentationXML(this.SearchType);

                this.LoadRDFSearchResults();
            }

            this.LoadAssets();
            masterpage.PresentationXML = this.PresentationXML;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;
            masterpage.Tab = "";

            string method = string.Empty;

            if (Request.QueryString["method"] != null)
            {
                method = Request.QueryString["method"];
            }
            else
            {
                method = "manage";
            }

            this.LoadPresentationXML(method);
            this.LoadAssets();
            BaseModule bm = new BaseModule();
            XmlNamespaceManager xnm;
            Framework.Utilities.Namespace name = new Namespace();
            bm.GetSubjectProfile();
            xnm = name.LoadNamespaces(bm.BaseData);
            masterpage.RDFData = bm.BaseData;
            masterpage.RDFNamespaces = xnm;
            bm = null;
            masterpage.PresentationXML = this.PresentationXML;
        }
示例#3
0
        public UserControl LoadControl(string UserControlPath, Profiles.Framework.Template masterpage, params object[] constructorParameters)
        {
            List <Type> constParamTypes = new List <Type>();
            //UserControl ctl = masterpage.LoadControl(UserControlPath) as UserControl;
            UserControl ctl = masterpage.LoadControl(UserControlPath) as UserControl;

            foreach (object constParam in constructorParameters)
            {
                constParamTypes.Add(constParam.GetType());
            }

            // Find the relevant constructor
            ConstructorInfo constructor = ctl.GetType().BaseType.GetConstructor(constParamTypes.ToArray());

            //And then call the standard constructor
            if (constructor == null)
            {
                throw new MemberAccessException("The requested constructor was not found on : " + ctl.GetType().BaseType.ToString());
            }
            else
            {
                constructor.Invoke(ctl, constructorParameters);
            }

            return(ctl);
        }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            masterpage     = (Framework.Template)base.Master;
            masterpage.Tab = "";

            string method = string.Empty;

            if (Request.QueryString["method"] != null)
            {
                method = Request.QueryString["method"];
            }
            else
            {
                method = "manage";
            }

            this.LoadPresentationXML(method);
            this.LoadAssets();
            BaseModule bm = new BaseModule();

            //the subject id should be passed in by query string var.
            XmlNamespaceManager xnm;

            Framework.Utilities.Namespace name = new Namespace();
            bm.GetSubjectProfile();
            xnm = name.LoadNamespaces(bm.BaseData);
            masterpage.RDFData       = bm.BaseData;
            masterpage.RDFNamespaces = xnm;
            bm = null;
            masterpage.PresentationXML = this.PresentationXML;
        }
示例#5
0
        public void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            LoadPresentationXML();
            this.LoadAssets();
            masterpage.PresentationXML = this.PresentationXML;
        }
示例#6
0
        public void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            LoadPresentationXML();
            this.LoadAssets();
            masterpage.PresentationXML = this.PresentationXML;
        }
示例#7
0
        public void Page_Load(object sender, EventArgs e)
        {
            UserHistory uh = new UserHistory();

            masterpage = (Framework.Template)base.Master;
            this.Master = masterpage;

            this.LoadAssets();

            this.LoadPresentationXML();

            XmlNode x = this.PresentationXML.SelectSingleNode("Presentation[1]/ExpandRDFList[1]");

            if (x != null)
                base.RDFTriple.ExpandRDFList = x.OuterXml;

            if (base.RDFTriple.Subject != 0 && base.RDFTriple.Predicate != 0 && base.RDFTriple.Object == 0)
                base.RDFTriple.Limit = "1";

            base.LoadRDFData();

            Framework.Utilities.DebugLogging.Log("Page_Load Profile 1: " + DateTime.Now.ToLongTimeString());

            masterpage.Tab = base.Tab;
            masterpage.RDFData = base.RDFData;
            masterpage.RDFNamespaces = base.RDFNamespaces;
            masterpage.PresentationXML = this.PresentationXML;
            Framework.Utilities.DebugLogging.Log("Page_Load Profile 2: " + DateTime.Now.ToLongTimeString());

            // UCSF added schema.org info
            // Only do this for a person only version of this page !
            XmlNode presentationClass = PresentationXML.SelectSingleNode("//Presentation/@PresentationClass", base.RDFNamespaces);
            if (presentationClass != null && "profile".Equals(presentationClass.InnerText.ToLower()) &&
                this.RDFData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/foaf:firstName", base.RDFNamespaces) != null &&
                this.RDFData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/foaf:lastName", base.RDFNamespaces) != null)
            {
                ((HtmlGenericControl)masterpage.FindControl("divProfilesContentMain")).Attributes.Add("itemscope", "itemscope");
                ((HtmlGenericControl)masterpage.FindControl("divProfilesContentMain")).Attributes.Add("itemtype", "http://schema.org/Person");

                HtmlMeta Description = new HtmlMeta();
                Description.Name = "Description";
                string name = this.RDFData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/foaf:firstName", base.RDFNamespaces).InnerText + " " +
                     this.RDFData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/foaf:lastName", base.RDFNamespaces).InnerText;
                Description.Content = name + "'s profile, publications, research topics, and co-authors";
                Page.Header.Controls.Add(Description);

                HtmlLink Canonical = new HtmlLink();
                Canonical.Href = Request.Url.AbsoluteUri.IndexOf('?') == -1 ? Request.Url.AbsoluteUri.ToLower() : Request.Url.AbsoluteUri.ToLower().Substring(0, Request.Url.AbsoluteUri.IndexOf('?'));
                Canonical.Attributes["rel"] = "canonical";
                Page.Header.Controls.Add(Canonical);
            }
            else
            {
                // Tell the bots that this is slow moving data, add an exires at some random date up to 30 days out
                DateTime expires = DateTime.Now.Add( TimeSpan.FromDays( random.NextDouble() * 29 + 1 ));
                Response.AddHeader("Expires", expires.ToUniversalTime().ToString("r"));
            }
        }
示例#8
0
        public void Page_Load(object sender, EventArgs e)
        {
            UserHistory uh = new UserHistory();

            masterpage  = (Framework.Template)base.Master;
            this.Master = masterpage;

            this.LoadAssets();

            this.LoadPresentationXML();

            XmlNode x = this.PresentationXML.SelectSingleNode("Presentation[1]/ExpandRDFList[1]");

            if (x != null)
            {
                base.RDFTriple.ExpandRDFList = x.OuterXml;
            }

            if (base.RDFTriple.Subject != 0 && base.RDFTriple.Predicate != 0 && base.RDFTriple.Object == 0)
            {
                base.RDFTriple.Limit = "1";
            }

            base.LoadRDFData();

            Framework.Utilities.DebugLogging.Log("Page_Load Profile 1: " + DateTime.Now.ToLongTimeString());

            masterpage.Tab             = base.Tab;
            masterpage.RDFData         = base.RDFData;
            masterpage.RDFNamespaces   = base.RDFNamespaces;
            masterpage.PresentationXML = this.PresentationXML;
            Framework.Utilities.DebugLogging.Log("Page_Load Profile 2: " + DateTime.Now.ToLongTimeString());

            // UCSF added schema.org info
            // Only do this for a person only version of this page !
            XmlNode presentationClass = PresentationXML.SelectSingleNode("//Presentation/@PresentationClass", base.RDFNamespaces);

            if (presentationClass != null && "profile".Equals(presentationClass.InnerText.ToLower()) &&
                this.RDFData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/foaf:firstName", base.RDFNamespaces) != null &&
                this.RDFData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/foaf:lastName", base.RDFNamespaces) != null)
            {
                ((HtmlGenericControl)masterpage.FindControl("divProfilesContentMain")).Attributes.Add("itemscope", "itemscope");
                ((HtmlGenericControl)masterpage.FindControl("divProfilesContentMain")).Attributes.Add("itemtype", "http://schema.org/Person");

                HtmlMeta Description = new HtmlMeta();
                Description.Name = "Description";
                string name = this.RDFData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/foaf:firstName", base.RDFNamespaces).InnerText + " " +
                              this.RDFData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/foaf:lastName", base.RDFNamespaces).InnerText;
                Description.Content = name + "'s profile, publications, research topics, and co-authors";
                Page.Header.Controls.Add(Description);

                HtmlLink Canonical = new HtmlLink();
                Canonical.Href = Request.Url.AbsoluteUri.IndexOf('?') == -1 ? Request.Url.AbsoluteUri.ToLower() : Request.Url.AbsoluteUri.ToLower().Substring(0, Request.Url.AbsoluteUri.IndexOf('?'));
                Canonical.Attributes["rel"] = "canonical";
                Page.Header.Controls.Add(Canonical);
            }
        }
示例#9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            masterpage.Tab = "";
            masterpage.RDFData = null;
            XmlDocument presentationxml = new XmlDocument();
            presentationxml.LoadXml(System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "/SPARQL/PresentationXML/SPARQLPresentation.xml"));
            masterpage.PresentationXML = presentationxml;
        }
示例#10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            masterpage.Tab     = "";
            masterpage.RDFData = null;
            XmlDocument presentationxml = new XmlDocument();

            presentationxml.LoadXml(System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "/SPARQL/PresentationXML/SPARQLPresentation.xml"));
            masterpage.PresentationXML = presentationxml;
        }
示例#11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            this.LoadAssets();

            this.LoadPresentationXML();

            masterpage.Tab = Request.QueryString["tab"];
            masterpage.PresentationXML = this.PresentationXML;
        }
        public void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;
            this.LoadAssets();

            masterpage.Tab = "";
            masterpage.RDFData = null;
            XmlDocument presentationxml = new XmlDocument();
            presentationxml.LoadXml(System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "/About/PresentationXML/GadgetLibrary.xml"));
            masterpage.PresentationXML = presentationxml;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            this.LoadAssets();

            this.LoadPresentationXML();

            masterpage.Tab             = Request.QueryString["tab"];
            masterpage.PresentationXML = this.PresentationXML;
        }
示例#14
0
        public void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;
            this.LoadAssets();

            masterpage.Tab     = "";
            masterpage.RDFData = null;
            XmlDocument presentationxml = new XmlDocument();

            presentationxml.LoadXml(System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "/About/PresentationXML/CloseBrowser.xml"));
            masterpage.PresentationXML = presentationxml;
        }
示例#15
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (Request.RawUrl.ToLower().Contains("clearcache"))
            {
                Cache.Remove(OpenSocialManager.ORNG_GADGET_SPEC_KEY);
            }
            masterpage = (Framework.Template)base.Master;

            LoadPresentationXML();
            this.LoadAssets();
            masterpage.PresentationXML = this.PresentationXML;
        }
示例#16
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (Request.RawUrl.ToLower().Contains("clearcache"))
            {
                Cache.Remove(OpenSocialManager.ORNG_GADGET_SPEC_KEY);
            }
            masterpage = (Framework.Template)base.Master;

            LoadPresentationXML();
            this.LoadAssets();
            masterpage.PresentationXML = this.PresentationXML;
        }
        public void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;
            this.Master = masterpage;

            this.LoadAssets();

            this.LoadPresentationXML();

            XmlNode x = this.PresentationXML.SelectSingleNode("Presentation[1]/ExpandRDFList[1]");

            if (x != null)
                base.RDFTriple.ExpandRDFList = x.OuterXml;

            base.LoadRDFData();

            masterpage.Tab = base.Tab;
            masterpage.RDFData = base.RDFData;
            masterpage.RDFNamespaces = base.RDFNamespaces;
            masterpage.PresentationXML = this.PresentationXML;

            // UCSF added schema.org info
            // Only do this for a person only version of this page !
            if (this.RDFData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/foaf:firstName", base.RDFNamespaces) != null)
            {
                ((HtmlGenericControl)masterpage.FindControl("divProfilesContentMain")).Attributes.Add("itemscope", "itemscope");
                ((HtmlGenericControl)masterpage.FindControl("divProfilesContentMain")).Attributes.Add("itemtype", "http://schema.org/Person");

                HtmlMeta Description = new HtmlMeta();
                Description.Name = "Description";
                string name = this.RDFData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/foaf:firstName", base.RDFNamespaces).InnerText + " " +
                     this.RDFData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/foaf:lastName", base.RDFNamespaces).InnerText;
                Description.Content = name + "'s profile, publications, research topics, and co-authors";
                Page.Header.Controls.Add(Description);

                HtmlLink Canonical = new HtmlLink();
                Canonical.Href = Root.Domain + Request.Url.AbsolutePath.ToLower();
                Canonical.Attributes["rel"] = "canonical";
                Page.Header.Controls.Add(Canonical);

                // email tracking
                HtmlGenericControl trackMailClickJs = new HtmlGenericControl("script");
                trackMailClickJs.Attributes.Add("type", "text/javascript");
                trackMailClickJs.InnerHtml =
                    "\n   // per http://stackoverflow.com/a/8570258/31100\n" +
                    "       function handleMailto(link, email) {\n" +
                    "       _gaq.push(['_trackEvent', 'Profile Page Interaction', 'activate_email_link', email, , false]);\n" +
                    "       _gaq.push(function () { document.location = link.href });\n" +
                    "       return false;\n" +
                    "   }\n";
                Page.Header.Controls.Add(trackMailClickJs);
            }
        }
示例#18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            sm = new Framework.Utilities.SessionManagement();

            if (sm.Session().UserID < 0 || sm.Session().UserID == 0)
            {
                Response.Redirect(Framework.Utilities.Root.Domain);
            }

            masterpage = (Framework.Template)base.Master;

            LoadPresentationXML();
        }
示例#19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            masterpage.Tab = "";
            masterpage.RDFData = null;
            XmlDocument presentationxml = new XmlDocument();
            string global_error = "";
            if (HttpContext.Current.Session["GLOBAL_ERROR"] != null)
            {
                global_error = HttpContext.Current.Session["GLOBAL_ERROR"].ToString();
            }
            if (global_error.Equals("HttpRequestValidationException")) presentationxml.LoadXml(System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "/Error/PresentationXML/HttpRequestValidationExceptionPresentation.xml"));
            else presentationxml.LoadXml(System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "/Error/PresentationXML/ErrorPresentation.xml"));
            masterpage.PresentationXML = presentationxml;
        }
        public void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            LoadPresentationXML();

            if (!String.IsNullOrEmpty(Request["owner"]))
            {
                // go ahead and swap in the pretty URL
                Literal backlink = (Literal)masterpage.FindControl("litBackLink");
                backlink.Text = "<a href='" + Root.Domain + "/" +
                                UCSFIDSet.ByNodeId[Convert.ToInt64(Request["owner"].Substring(Request["owner"].LastIndexOf("/") + 1))].PrettyURL +
                                "'>Back to Profile</a>";
            }

            this.LoadAssets();
            masterpage.PresentationXML = this.PresentationXML;
        }
        public void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            LoadPresentationXML();

            if (!String.IsNullOrEmpty(Request["owner"]))
            {
                // go ahead and swap in the pretty URL
                Literal backlink = (Literal)masterpage.FindControl("litBackLink");
                backlink.Text = "<a href='" + Root.Domain + "/" +
                    UCSFIDSet.ByNodeId[Convert.ToInt64(Request["owner"].Substring(Request["owner"].LastIndexOf("/") + 1))].PrettyURL +
                    "'>Back to Profile</a>";
            }

            this.LoadAssets();
            masterpage.PresentationXML = this.PresentationXML;
        }
示例#22
0
        override protected void OnInit(EventArgs e)
        {
            SessionManagement session = new SessionManagement();

            masterpage  = (Framework.Template)base.Master;
            this.Master = masterpage;

            this.LoadAssets();

            if (Request.QueryString["subject"] != null)
            {
                this.RDFTriple             = new RDFTriple(Convert.ToInt64(Request.QueryString["subject"]));
                this.RDFTriple.Edit        = true;
                this.RDFTriple.Predicate   = 0;
                this.RDFTriple.Expand      = false;
                this.RDFTriple.Object      = 0;
                this.RDFTriple.ShowDetails = true;


                session.RDFTriple = this.RDFTriple;
                session.ClearEditSession();
            }
            else
            {
                this.RDFTriple = session.RDFTriple;
            }

            this.LoadPageData();

            if (this.PresentationXML.SelectSingleNode("Presentation/PageOptions[@CanEdit='true']") == null)
            {
                Response.Redirect(Root.Domain + "/search");
            }

            //masterpage.Tab = base.Tab;
            masterpage.RDFData         = this.RDFData;
            masterpage.RDFNamespaces   = this.RDFNamespaces;
            masterpage.PresentationXML = this.PresentationXML;
        }
示例#23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            masterpage.Tab     = "";
            masterpage.RDFData = null;
            XmlDocument presentationxml = new XmlDocument();
            string      global_error    = "";

            if (HttpContext.Current.Session["GLOBAL_ERROR"] != null)
            {
                global_error = HttpContext.Current.Session["GLOBAL_ERROR"].ToString();
            }
            if (global_error.Equals("HttpRequestValidationException"))
            {
                presentationxml.LoadXml(System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "/Error/PresentationXML/HttpRequestValidationExceptionPresentation.xml"));
            }
            else
            {
                presentationxml.LoadXml(System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "/Error/PresentationXML/ErrorPresentation.xml"));
            }
            masterpage.PresentationXML = presentationxml;
        }
示例#24
0
        public void Page_Load(object sender, EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;
            this.LoadAssets();
            SessionManagement sm = new SessionManagement();

            Framework.Utilities.DataIO data = new Profiles.Framework.Utilities.DataIO();
            if (data.IsGroupAdmin(sm.Session().UserID))
            {
                masterpage.Tab     = "";
                masterpage.RDFData = null;
                XmlDocument presentationxml = new XmlDocument();
                presentationxml.LoadXml(System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "/GroupAdmin/PresentationXML/GroupAdminPresentation.xml"));
                masterpage.PresentationXML = presentationxml;
            }
            else
            {
                masterpage.Tab     = "";
                masterpage.RDFData = null;
                XmlDocument presentationxml = new XmlDocument();
                presentationxml.LoadXml(System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "/GroupAdmin/PresentationXML/GroupAdminAuthFailedPresentation.xml"));
                masterpage.PresentationXML = presentationxml;
            }
        }
示例#25
0
        protected override void OnInit(EventArgs e)
        {
            SessionManagement session = new SessionManagement();

            masterpage = (Framework.Template)base.Master;
            this.Master = masterpage;

            this.LoadAssets();

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

                this.RDFTriple = new RDFTriple(Convert.ToInt64(Request.QueryString["subject"]));
                this.RDFTriple.Edit = true;
                this.RDFTriple.Predicate = 0;
                this.RDFTriple.Expand = false;
                this.RDFTriple.Object = 0;
                this.RDFTriple.ShowDetails = true;

                session.RDFTriple = this.RDFTriple;
                session.ClearEditSession();

            }
            else
            {
                this.RDFTriple = session.RDFTriple;
            }

            this.LoadPageData();

            if (this.PresentationXML.SelectSingleNode("Presentation/PageOptions[@CanEdit='true']") == null)
                Response.Redirect(Root.Domain + "/search");

            //masterpage.Tab = base.Tab;
            masterpage.RDFData = this.RDFData;
            masterpage.RDFNamespaces = this.RDFNamespaces;
            masterpage.PresentationXML = this.PresentationXML;
        }
        //public void Page_Load(object sender, EventArgs e)
        protected override void OnInit(EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            if (Request.QueryString["searchtype"] == null && Request.Form["searchtype"] == null)
            {
                this.LoadPresentationXML("searchform");
                if (Request.QueryString["tab"] != null)
                    masterpage.Tab = Request.QueryString["tab"];
                else
                    masterpage.Tab = "";
                masterpage.RDFData = null;
                masterpage.RDFNamespaces = null;
            }
            // added by UCSF.  A hack THAT DOES NOT WORK
            else if (Request.QueryString["tab"] == "concept")
            {
                Response.Redirect(Root.Domain + "/search/default.aspx?searchtype=everything&searchfor=" + HttpUtility.UrlEncode(Request.Form["txtSearchFor"]) +
                    "&ClassGroupURI=" + HttpUtility.UrlEncode("http://profiles.catalyst.harvard.edu/ontology/prns!ClassGroupConcepts") + "&perpage=15&offset=");
            }
            else
            {
                if (Request.QueryString["tab"] != null)
                    masterpage.Tab = Request.QueryString["tab"];
                else
                    masterpage.Tab = "";

                if (Request.QueryString["searchtype"] != null)
                    this.LoadPresentationXML(Request.QueryString["searchtype"]);
                else
                    this.LoadPresentationXML(Request.Form["searchtype"]);

                this.LoadRDFSearchResults();
            }

            this.LoadAssets();
            masterpage.PresentationXML = this.PresentationXML;
        }
        //public void Page_Load(object sender, EventArgs e)
        protected override void OnInit(EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            string tab = string.Empty;

            if (Request.QueryString["searchtype"] == null && Request.Form["searchtype"] == null && Session["DIRECTSEARCHTYPE"] != null)
                this.SearchType = Session["DIRECTSEARCHTYPE"].ToString();
            else if (Request.QueryString["searchtype"] == null && Request.Form["searchtype"] != null && Session["DIRECTSEARCHTYPE"] == null)
                this.SearchType = Request.Form["searchtype"];
            else if (Request.QueryString["searchtype"] != null && Request.Form["searchtype"] == null && Session["DIRECTSEARCHTYPE"] == null)
                this.SearchType = Request.QueryString["searchtype"];

            if (Session["DIRECTSEARCHREQUEST"] != null)
            {
                masterpage.SearchRequest = Session["DIRECTSEARCHREQUEST"].ToString();
                string searchrequest = masterpage.SearchRequest;

                Session["DIRECTKEYWORD"] = null;
                Session["DIRECTSEARCHREQUEST"] = null;
                Session["DIRECTSEARCHTYPE"] = null;

                Utilities.DataIO data = new Profiles.Search.Utilities.DataIO();

                data.SearchRequest("", "", "", "", "", "", "", "", "", "", "", "15", "0", "", "", "", "", ref searchrequest);

                Response.Redirect(Root.Domain + "/search/default.aspx?searchtype=" + this.SearchType + "&searchrequest=" + searchrequest, true);

            }

            if (this.SearchType.IsNullOrEmpty())
            {
                this.LoadPresentationXML("searchform");
                if (Request.QueryString["tab"] != null)
                    masterpage.Tab = Request.QueryString["tab"];
                else
                    masterpage.Tab = "";

                masterpage.RDFData = null;
                masterpage.RDFNamespaces = null;
            }
            else
            {
                if (Request.QueryString["tab"] != null)
                    masterpage.Tab = Request.QueryString["tab"];
                else
                    masterpage.Tab = "";

                this.LoadPresentationXML(this.SearchType);

                this.LoadRDFSearchResults();
            }

            this.LoadAssets();
            masterpage.PresentationXML = this.PresentationXML;
        }
示例#28
0
        //public void Page_Load(object sender, EventArgs e)
        override protected void OnInit(EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;


            string tab = string.Empty;


            if (Request.QueryString["searchtype"] == null && Request.Form["searchtype"] == null && Session["DIRECTSEARCHTYPE"] != null)
            {
                this.SearchType = Session["DIRECTSEARCHTYPE"].ToString();
            }
            else if (Request.QueryString["searchtype"] == null && Request.Form["searchtype"] != null && Session["DIRECTSEARCHTYPE"] == null)
            {
                this.SearchType = Request.Form["searchtype"];
            }
            else if (Request.QueryString["searchtype"] != null && Request.Form["searchtype"] == null && Session["DIRECTSEARCHTYPE"] == null)
            {
                this.SearchType = Request.QueryString["searchtype"];
            }


            if (Session["DIRECTSEARCHREQUEST"] != null)
            {
                masterpage.SearchRequest = Session["DIRECTSEARCHREQUEST"].ToString();
                string searchrequest = masterpage.SearchRequest;

                Session["DIRECTKEYWORD"]       = null;
                Session["DIRECTSEARCHREQUEST"] = null;
                Session["DIRECTSEARCHTYPE"]    = null;

                Utilities.DataIO data = new Profiles.Search.Utilities.DataIO();

                data.SearchRequest("", "", "", "", "", "", "", "", "", "", "", "15", "0", "", "", "", "", ref searchrequest);

                Response.Redirect(Root.Domain + "/search/default.aspx?searchtype=" + this.SearchType + "&searchrequest=" + searchrequest, true);
            }

            if (this.SearchType.IsNullOrEmpty())
            {
                this.LoadPresentationXML("searchform");
                if (Request.QueryString["tab"] != null)
                {
                    masterpage.Tab = Request.QueryString["tab"];
                }
                else
                {
                    masterpage.Tab = "";
                }



                masterpage.RDFData       = null;
                masterpage.RDFNamespaces = null;
            }
            // added by UCSF.  A hack THAT NEEDS TO BE TESTED (try not doing the UrlEncode)
            else if (Request.QueryString["tab"] == "concept")
            {
                Response.Redirect(Root.Domain + "/search/default.aspx?searchtype=everything&searchfor=" + HttpUtility.UrlEncode(Request.Form["txtSearchFor"]) +
                                  "&ClassGroupURI=" + HttpUtility.UrlEncode("http://profiles.catalyst.harvard.edu/ontology/prns!ClassGroupConcepts") + "&perpage=15&offset=");
            }
            else
            {
                if (Request.QueryString["tab"] != null)
                {
                    masterpage.Tab = Request.QueryString["tab"];
                }
                else
                {
                    masterpage.Tab = "";
                }

                this.LoadPresentationXML(this.SearchType);

                this.LoadRDFSearchResults();
            }

            this.LoadAssets();
            masterpage.PresentationXML = this.PresentationXML;
        }
示例#29
0
        //public void Page_Load(object sender, EventArgs e)
        override protected void OnInit(EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;


            string tab = string.Empty;


            if (Request.QueryString["searchtype"] == null && Request.Form["searchtype"] == null && Session["DIRECTSEARCHTYPE"] != null)
            {
                this.SearchType = Session["DIRECTSEARCHTYPE"].ToString();
            }
            else if (Request.QueryString["searchtype"] == null && Request.Form["searchtype"] != null && Session["DIRECTSEARCHTYPE"] == null)
            {
                this.SearchType = Request.Form["searchtype"];
            }
            else if (Request.QueryString["searchtype"] != null && Request.Form["searchtype"] == null && Session["DIRECTSEARCHTYPE"] == null)
            {
                this.SearchType = Request.QueryString["searchtype"];
            }


            if (Session["DIRECTSEARCHREQUEST"] != null)
            {
                masterpage.SearchRequest = Session["DIRECTSEARCHREQUEST"].ToString();
                string searchrequest = masterpage.SearchRequest;

                Session["DIRECTKEYWORD"]       = null;
                Session["DIRECTSEARCHREQUEST"] = null;
                Session["DIRECTSEARCHTYPE"]    = null;

                Utilities.DataIO data = new Profiles.Search.Utilities.DataIO();

                data.SearchRequest("", "", "", "", "", "", "", "", "", "", "", "15", "0", "", "", "", "", ref searchrequest);

                Response.Redirect(Root.Domain + "/search/default.aspx?searchtype=" + this.SearchType + "&searchrequest=" + searchrequest, true);
            }

            if (this.SearchType.IsNullOrEmpty())
            {
                this.LoadPresentationXML("searchform");
                if (Request.QueryString["tab"] != null)
                {
                    masterpage.Tab = Request.QueryString["tab"];
                }
                else
                {
                    masterpage.Tab = "";
                }



                masterpage.RDFData       = null;
                masterpage.RDFNamespaces = null;
            }
            else
            {
                if (Request.QueryString["tab"] != null)
                {
                    masterpage.Tab = Request.QueryString["tab"];
                }
                else
                {
                    masterpage.Tab = "";
                }

                this.LoadPresentationXML(this.SearchType);

                this.LoadRDFSearchResults();
            }

            this.LoadAssets();
            masterpage.PresentationXML = this.PresentationXML;
        }
示例#30
0
        //public void Page_Load(object sender, EventArgs e)
        protected override void OnInit(EventArgs e)
        {
            masterpage = (Framework.Template)base.Master;

            string tab = string.Empty;

            if (Request.QueryString["searchtype"] == null && Request.Form["searchtype"] == null && Session["DIRECTSEARCHTYPE"] != null)
                this.SearchType = Session["DIRECTSEARCHTYPE"].ToString();
            else if (Request.QueryString["searchtype"] == null && Request.Form["searchtype"] != null && Session["DIRECTSEARCHTYPE"] == null)
                this.SearchType = Request.Form["searchtype"];
            else if (Request.QueryString["searchtype"] != null && Request.Form["searchtype"] == null && Session["DIRECTSEARCHTYPE"] == null)
                this.SearchType = Request.QueryString["searchtype"];

            if (Session["DIRECTSEARCHREQUEST"] != null)
            {
                masterpage.SearchRequest = Session["DIRECTSEARCHREQUEST"].ToString();
                string searchrequest = masterpage.SearchRequest;

                Session["DIRECTKEYWORD"] = null;
                Session["DIRECTSEARCHREQUEST"] = null;
                Session["DIRECTSEARCHTYPE"] = null;

                Utilities.DataIO data = new Profiles.Search.Utilities.DataIO();

                data.SearchRequest("", "", "", "", "", "", "", "", "", "", "", "15", "0", "", "", "", "", ref searchrequest);

                Response.Redirect(Root.Domain + "/search/default.aspx?searchtype=" + this.SearchType + "&searchrequest=" + searchrequest, true);

            }

            if (this.SearchType.IsNullOrEmpty())
            {
                this.LoadPresentationXML("searchform");
                if (Request.QueryString["tab"] != null)
                    masterpage.Tab = Request.QueryString["tab"];
                else
                    masterpage.Tab = "";

                masterpage.RDFData = null;
                masterpage.RDFNamespaces = null;
            }
            // added by UCSF.  A hack THAT NEEDS TO BE TESTED (try not doing the UrlEncode)
            else if (Request.QueryString["tab"] == "concept")
            {
                Response.Redirect(Root.Domain + "/search/default.aspx?searchtype=everything&searchfor=" + HttpUtility.UrlEncode(Request.Form["txtSearchFor"]) +
                    "&ClassGroupURI=" + HttpUtility.UrlEncode("http://profiles.catalyst.harvard.edu/ontology/prns!ClassGroupConcepts") + "&perpage=15&offset=");
            }
            else
            {
                if (Request.QueryString["tab"] != null)
                    masterpage.Tab = Request.QueryString["tab"];
                else
                    masterpage.Tab = "";

                this.LoadPresentationXML(this.SearchType);

                this.LoadRDFSearchResults();
            }

            this.LoadAssets();
            masterpage.PresentationXML = this.PresentationXML;
        }