Пример #1
0
        public moregadgets()
        {
            if (this.userid < 1)
            {
                HttpContext.Current.Response.Redirect(forumurlnopage + "/login.aspx?reurl=space");
                return;
            }
            GetOnlineUserInfo();

#if NET1
            TabInfoCollection tc = Spaces.GetTabInfoCollectionByUserID(this.userid);
#else
            Discuz.Common.Generic.List <TabInfo> tc = Spaces.GetTabInfoCollectionByUserID(this.userid);
#endif

            currentUserSpaceConfig = Spaces.GetSpaceConfigByUserId(this.userid);
            int            defaultTabId = Spaces.GetDefaultTabId(currentUserSpaceConfig, tc);
            string         html         = StaticFileProvider.GetContent(templatePath + "moregadgets.htm");
            TemplateEngine te           = new TemplateEngine();
            te.Init(html, templatePath);
            te.Put("tabid", defaultTabId);
            te.Put("forumpath", BaseConfigs.GetForumPath);
            te.Put("config", currentUserSpaceConfig);
            te.Put("username", this.olusername);
            te.Put("userid", this.oluserid);
            te.Put("userkey", oluserkey);
            te.Put("forumurlnopage", forumurlnopage);
            double processtime = new TimeSpan(DateTime.Now.Ticks).Subtract(begints).Duration().TotalSeconds;
            te.Put("processtime", processtime);
            html = te.MergeTemplate();
            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.Write(html);
            HttpContext.Current.Response.End();
        }