/// <summary> /// 查询条件 /// </summary> //public string condition = ""; #endregion protected override void ShowPage() { // 得到公告 announcementlist = Announcements.GetSimplifiedAnnouncementList(nowdatetime, "2999-01-01 00:00:00"); announcementcount = 0; if (announcementlist != null) { announcementcount = announcementlist.Rows.Count; } inforumad = ""; floatad = Advertisements.GetFloatAd("indexad", 0); doublead = Advertisements.GetDoubleAd("indexad", 0); mediaad = Advertisements.GetMediaAd(templatepath, "indexad", 0); if (config.Enablemall <= 1) //开启普通模式 { AddErrLine("当前页面只有在开启商城(高级)模式下才可访问"); return; } new_goodsinfocoll = Goods.GetGoodsInfoList(3, 1, "", "goodsid", 1); sec_hand_goodsinfocoll = Goods.GetGoodsInfoList(9, 1, DatabaseProvider.GetInstance().GetGoodsQualityCondition((int)MallUtils.OperaCode.Equal, 2), "goodsid", 1); one_yuan_goodsinfocoll = Goods.GetGoodsInfoList(9, 1, DatabaseProvider.GetInstance().GetGoodsPriceCondition((int)MallUtils.OperaCode.Equal, 1), "goodsid", 1); recommend_goodsinfocoll = Goods.GetGoodsInfoList(10, 1, DatabaseProvider.GetInstance().GetGoodsRecommendCondition((int)MallUtils.OperaCode.Equal, 1), "goodsid", 1); goodscategory = GoodsCategories.GetRootGoodsCategoriesJson(); rootgoodscategoryarray = GoodsCategories.GetShopRootCategory(); }
protected override void ShowPage() { pagetitle = "日志列表"; if (config.Enablespace != 1) { AddErrLine("个人空间功能已被关闭"); return; } newtopiclist = AggregationFacade.ForumAggregation.GetForumTopicList(10, 0, 0, TopicTimeType.All, TopicOrderType.PostDateTime, false, false); hottopiclist = AggregationFacade.ForumAggregation.GetForumTopicList(10, 0, 0, TopicTimeType.All, TopicOrderType.Views, false, false); recentupdatespacelist = AggregationFacade.SpaceAggregation.GetRecentUpdateSpaceList(AggregationConfig.GetConfig().RecentUpdateSpaceAggregationListCount); // 得到公告 announcementlist = Announcements.GetSimplifiedAnnouncementList(nowdatetime, "2999-01-01 00:00:00"); announcementcount = 0; if (announcementlist != null) { announcementcount = announcementlist.Rows.Count; } rotatepicdata = AggregationFacade.BaseAggregation.GetRotatePicData(); currentpage = DNTRequest.GetInt("page", 1); blogsCount = AggregationFacade.SpaceAggregation.GetSpacePostsCount(); pagecount = blogsCount % pageSize == 0 ? blogsCount / pageSize : blogsCount / pageSize + 1; if (pagecount == 0) { pagecount = 1; } if (currentpage < 1) { currentpage = 1; } if (currentpage > pagecount) { currentpage = pagecount; } spacepostlist = AggregationFacade.SpaceAggregation.GetSpacePostList("Spaceindex"); pagenumbers = Utils.GetPageNumbers(currentpage, pagecount, "bloglist.aspx", 8); postslist = AggregationFacade.SpaceAggregation.SpacePostsList(pageSize, currentpage); if (config.Enablealbum == 1) { recommendalbumlist = AggregationFacade.AlbumAggregation.GetRecommandAlbumList("Spaceindex"); } topspacecomments = AggregationFacade.SpaceAggregation.GetSpaceTopComments(); }
protected override void ShowPage() { pagetitle = config.Spacename + "首页"; if (config.Enablespace != 1) { AddErrLine("个人空间功能已被关闭"); return; } if (config.Rssstatus == 1) { AddLinkRss("tools/spacerss.aspx", "最新日志"); } newtopiclist = AggregationFacade.ForumAggregation.GetForumTopicList(10, 0, 0, TopicTimeType.All, TopicOrderType.PostDateTime, false, false); hottopiclist = AggregationFacade.ForumAggregation.GetForumTopicList(10, 0, 0, TopicTimeType.All, TopicOrderType.Views, false, false); recentupdatespaceList = AggregationFacade.SpaceAggregation.GetRecentUpdateSpaceList(AggregationConfig.GetConfig().RecentUpdateSpaceAggregationListCount); // 得到公告 announcementlist = Announcements.GetSimplifiedAnnouncementList(nowdatetime, "2999-01-01 00:00:00"); announcementcount = 0; if (announcementlist != null) { announcementcount = announcementlist.Rows.Count; } rotatepicdata = AggregationFacade.SpaceAggregation.GetRotatePicData(); spacepostlist = AggregationFacade.SpaceAggregation.GetSpacePostList("Spaceindex"); spaceconfigs = AggregationFacade.SpaceAggregation.GetSpaceListFromFile("Spaceindex"); topspacelistbycommentcount = AggregationFacade.SpaceAggregation.GetTopSpaceListFromCache("commentcount"); topspacelistbyvisitedtimes = AggregationFacade.SpaceAggregation.GetTopSpaceListFromCache("visitedtimes"); topspacepostcommentcount = AggregationFacade.SpaceAggregation.GetTopSpacePostListFromCache("commentcount"); topspacepostviews = AggregationFacade.SpaceAggregation.GetTopSpacePostListFromCache("views"); topspacecomments = AggregationFacade.SpaceAggregation.GetSpaceTopComments(); if (config.Enablealbum == 1) { recommendalbumlist = AggregationFacade.AlbumAggregation.GetRecommandAlbumList("Spaceindex"); } }
protected override void ShowPage() { pagetitle = "首页"; if (config.Rssstatus == 1) { AddLinkRss("tools/rss.aspx", "最新主题"); } // 得到公告 announcementlist = Announcements.GetSimplifiedAnnouncementList(nowdatetime, "2999-01-01 00:00:00"); if (announcementlist != null) { announcementcount = announcementlist.Rows.Count; } // 友情链接 forumlinkcount = forumlinklist.Rows.Count; Forums.GetForumIndexCollection(config.Hideprivate, usergroupid, config.Moddisplay, out totaltopic, out totalpost, out todayposts); // 获得统计信息 totalusers = TypeConverter.StrToInt(Statistics.GetStatisticsRowItem("totalusers")); lastusername = Statistics.GetStatisticsRowItem("lastusername"); lastuserid = TypeConverter.StrToInt(Statistics.GetStatisticsRowItem("lastuserid")); yesterdayposts = TypeConverter.StrToInt(Statistics.GetStatisticsRowItem("yesterdayposts")); highestposts = TypeConverter.StrToInt(Statistics.GetStatisticsRowItem("highestposts")); highestpostsdate = Statistics.GetStatisticsRowItem("highestpostsdate").ToString().Trim(); if (todayposts > highestposts) { highestposts = todayposts; highestpostsdate = DateTime.Now.ToString("yyyy-M-d"); } totalonline = onlineusercount; OnlineUsers.GetOnlineUserCollection(out totalonline, out totalonlineguest, out totalonlineuser, out totalonlineinvisibleuser); highestonlineusercount = Statistics.GetStatisticsRowItem("highestonlineusercount"); highestonlineusertime = Statistics.GetStatisticsRowItem("highestonlineusertime"); if (userid != -1) { score = Scoresets.GetValidScoreName(); ShortUserInfo user = Users.GetShortUserInfo(userid); score1 = ((decimal)user.Extcredits1).ToString(); score2 = ((decimal)user.Extcredits2).ToString(); score3 = ((decimal)user.Extcredits3).ToString(); score4 = ((decimal)user.Extcredits4).ToString(); score5 = ((decimal)user.Extcredits5).ToString(); score6 = ((decimal)user.Extcredits6).ToString(); score7 = ((decimal)user.Extcredits7).ToString(); score8 = ((decimal)user.Extcredits8).ToString(); } //相册 if (config.Enablealbum == 1 && AlbumPluginProvider.GetInstance() != null) { albumcategorylist = AlbumPluginProvider.GetInstance().GetAlbumCategory(); } if (config.Enablespace == 1 && AggregationFacade.SpaceAggregation.GetSpaceTopComments() != null) { topspacecomments = AggregationFacade.SpaceAggregation.GetSpaceTopComments(); } taglist = (config.Enabletag == 1 ? ForumTags.GetCachedHotForumTags(config.Hottagcount) : new TagInfo[0]); doublead = Advertisements.GetDoubleAd("indexad", 0); floatad = Advertisements.GetFloatAd("indexad", 0); }
protected override void ShowPage() { pagetitle = "首页"; if (userid > 0 && useradminid > 0) { AdminGroupInfo admingroupinfo = AdminGroups.GetAdminGroupInfo(usergroupid); if (admingroupinfo != null) { disablepostctrl = admingroupinfo.Disablepostctrl; } } int toframe = DNTRequest.GetInt("f", 1); if (toframe == 0) { ForumUtils.WriteCookie("isframe", "1"); } else { toframe = Utils.StrToInt(ForumUtils.GetCookie("isframe"), -1) == -1 ? config.Isframeshow : Utils.StrToInt(ForumUtils.GetCookie("isframe"), -1); } if (toframe == 2) { HttpContext.Current.Response.Redirect(BaseConfigs.GetForumPath + "frame.aspx"); HttpContext.Current.Response.End(); return; } if (config.Rssstatus == 1) { AddLinkRss("tools/rss.aspx", "最新主题"); } OnlineUsers.UpdateAction(olid, UserAction.IndexShow.ActionID, 0, config.Onlinetimeout); //if (newpmcount > 0) // pmlist = PrivateMessages.GetPrivateMessageListForIndex(userid,5,1,1); if (userid != -1) { userinfo = Users.GetShortUserInfo(userid); if (userinfo == null) { userid = -1; ForumUtils.ClearUserCookie("dnt"); } else { newpmcount = userinfo.Newpm == 0 ? 0 : newpmcount; lastvisit = userinfo.Lastvisit.ToString(); showpmhint = Convert.ToInt32(userinfo.Newsletter) > 4; } } navhomemenu = Caches.GetForumListMenuDivCache(usergroupid, userid, config.Extname); forumlist = Forums.GetForumIndexCollection(config.Hideprivate, usergroupid, config.Moddisplay, out totaltopic, out totalpost, out todayposts); forumlinkcount = forumlinklist.Rows.Count; //个人空间控制 if (config.Enablespace == 1) { GetSpacePerm(); } // 获得统计信息 totalusers = TypeConverter.StrToInt(Statistics.GetStatisticsRowItem("totalusers")); lastusername = Statistics.GetStatisticsRowItem("lastusername").Trim(); lastuserid = TypeConverter.StrToInt(Statistics.GetStatisticsRowItem("lastuserid")); yesterdayposts = TypeConverter.StrToInt(Statistics.GetStatisticsRowItem("yesterdayposts")); highestposts = TypeConverter.StrToInt(Statistics.GetStatisticsRowItem("highestposts")); highestpostsdate = Statistics.GetStatisticsRowItem("highestpostsdate").ToString().Trim(); if (todayposts > highestposts) { highestposts = todayposts; highestpostsdate = DateTime.Now.ToString("yyyy-M-d"); } totalonline = onlineusercount; showforumonline = false; onlineiconlist = Caches.GetOnlineGroupIconList(); if (totalonline < config.Maxonlinelist || DNTRequest.GetString("showonline") == "yes") { showforumonline = true; //获得在线用户列表和图标 onlineuserlist = OnlineUsers.GetOnlineUserCollection(out totalonline, out totalonlineguest, out totalonlineuser, out totalonlineinvisibleuser); } if (DNTRequest.GetString("showonline") == "no") { showforumonline = false; } highestonlineusercount = Statistics.GetStatisticsRowItem("highestonlineusercount"); highestonlineusertime = DateTime.Parse(Statistics.GetStatisticsRowItem("highestonlineusertime")).ToString("yyyy-MM-dd HH:mm"); // 得到公告 announcementlist = Announcements.GetSimplifiedAnnouncementList(nowdatetime, "2999-01-01 00:00:00"); announcementcount = announcementlist != null ? announcementlist.Rows.Count : 0; List <IndexPageForumInfo> topforum = new List <IndexPageForumInfo>(); foreach (IndexPageForumInfo f in forumlist) { f.Description = UBB.ParseSimpleUBB(f.Description); if (f.Layer == 0) { topforum.Add(f); } } taglist = config.Enabletag == 1 ? ForumTags.GetCachedHotForumTags(config.Hottagcount) : new TagInfo[0]; ///得到广告列表 headerad = Advertisements.GetOneHeaderAd("indexad", 0); footerad = Advertisements.GetOneFooterAd("indexad", 0); inforumad = Advertisements.GetInForumAd("indexad", 0, topforum, templatepath); pagewordad = Advertisements.GetPageWordAd("indexad", 0); doublead = Advertisements.GetDoubleAd("indexad", 0); floatad = Advertisements.GetFloatAd("indexad", 0); mediaad = Advertisements.GetMediaAd(templatepath, "indexad", 0); pagead = Advertisements.GetPageAd("indexad", 0); if (userid > 0) { if (oluserinfo.Newpms < 0) { Users.UpdateUserNewPMCount(userid, olid); } } }
protected override void ShowPage() { pagetitle = "首页"; score = Scoresets.GetValidScoreName(); if (config.Rssstatus == 1) { AddLinkRss("tools/rss.aspx", string.Format("{0} 最新主题", config.Forumtitle)); } OnlineUsers.UpdateAction(olid, UserAction.IndexShow.ActionID, 0, config.Onlinetimeout); if (newpmcount > 0) { pmlist = PrivateMessages.GetPrivateMessageCollectionForIndex(userid, 5, 1, 1); } userinfo = new ShortUserInfo(); if (userid != -1) { userinfo = Discuz.Forum.Users.GetShortUserInfo(userid); if (userinfo.Newpm == 0) { base.newpmcount = 0; } lastvisit = userinfo.Lastvisit.ToString(); showpmhint = Convert.ToInt32(userinfo.Newsletter) > 4; } Statistics.GetPostCountFromForum(0, out totaltopic, out totalpost, out todayposts); digesttopiclist = Focuses.GetDigestTopicList(16); hottopiclist = Focuses.GetHotTopicList(16, 30); forumlinklist = Caches.GetForumLinkList(); forumlinkcount = forumlinklist.Rows.Count; // 获得统计信息 totalusers = Utils.StrToInt(Statistics.GetStatisticsRowItem("totalusers"), 0); lastusername = Statistics.GetStatisticsRowItem("lastusername"); lastuserid = Utils.StrToInt(Statistics.GetStatisticsRowItem("lastuserid"), 0); totalonline = onlineusercount; showforumonline = false; if (totalonline < config.Maxonlinelist || DNTRequest.GetString("showonline") == "yes") { showforumonline = true; onlineuserlist = OnlineUsers.GetOnlineUserList(onlineusercount, out totalonlineguest, out totalonlineuser, out totalonlineinvisibleuser); onlineiconlist = Caches.GetOnlineGroupIconList(); } if (DNTRequest.GetString("showonline") == "no") { showforumonline = false; } highestonlineusercount = Statistics.GetStatisticsRowItem("highestonlineusercount"); highestonlineusertime = Statistics.GetStatisticsRowItem("highestonlineusertime"); // 得到公告 announcementlist = Announcements.GetSimplifiedAnnouncementList(nowdatetime, "2999-01-01 00:00:00"); announcementcount = 0; if (announcementlist != null) { announcementcount = announcementlist.Rows.Count; } ///得到广告列表 headerad = Advertisements.GetOneHeaderAd("indexad", 0); footerad = Advertisements.GetOneFooterAd("indexad", 0); pagewordad = Advertisements.GetPageWordAd("indexad", 0); doublead = Advertisements.GetDoubleAd("indexad", 0); floatad = Advertisements.GetFloatAd("indexad", 0); }
private string condition = ""; //查询条件 protected override void ShowPage() { // 得到公告 announcementlist = Announcements.GetSimplifiedAnnouncementList(nowdatetime, "2999-01-01 00:00:00"); announcementcount = 0; if (announcementlist != null) { announcementcount = announcementlist.Rows.Count; } inforumad = ""; floatad = Advertisements.GetFloatAd("indexad", 0); doublead = Advertisements.GetDoubleAd("indexad", 0); mediaad = Advertisements.GetMediaAd(templatepath, "indexad", 0); if (config.Enablemall <= 1) //开启普通模式 { AddErrLine("当前页面只有在开启商城(高级)模式下才可访问"); return; } categoryid = DNTRequest.GetInt("categoryid", 0); if (categoryid <= 0) { AddErrLine("无效的商品分类I1"); return; } goodscategoryinfo = GoodsCategories.GetGoodsCategoryInfoById(categoryid); if (goodscategoryinfo == null || goodscategoryinfo.Categoryid <= 0) { AddErrLine("无效的商品分类ID"); return; } string orderStr = "goodsid"; condition = ""; //得到当前用户请求的页数 pageid = DNTRequest.GetInt("page", 1); //获取主题总数 goodscount = Goods.GetGoodsCount(categoryid, condition); // 得到gpp设置 gpp = 16;//Utils.StrToInt(ForumUtils.GetCookie("tpp"), config.Tpp); if (gpp <= 0) { gpp = config.Tpp; } //修正请求页数中可能的错误 if (pageid < 1) { pageid = 1; } //获取总页数 pagecount = goodscount % gpp == 0 ? goodscount / gpp : goodscount / gpp + 1; if (pagecount == 0) { pagecount = 1; } if (pageid > pagecount) { pageid = pagecount; } goodslist = Goods.GetGoodsInfoList(goodscategoryinfo.Categoryid, gpp, pageid, condition, orderStr, direct); if (config.Aspxrewrite == 1) { pagenumbers = Utils.GetStaticPageNumbers(pageid, pagecount, "mallgoodslist-" + categoryid.ToString(), config.Extname, 8); } else { pagenumbers = Utils.GetPageNumbers(pageid, pagecount, "mallgoodslist.aspx?categoryid=" + categoryid.ToString(), 8); } //得到子分类JSON格式 subcategoriesjson = GoodsCategories.GetSubCategoriesJson(goodscategoryinfo.Categoryid); new_goodsinfocoll = Goods.GetGoodsInfoList(3, 1, "", "goodsid", 1); sec_hand_goodsinfocoll = Goods.GetGoodsInfoList(9, 1, DatabaseProvider.GetInstance().GetGoodsQualityCondition((int)MallUtils.OperaCode.Equal, 2), "goodsid", 1); one_yuan_goodsinfocoll = Goods.GetGoodsInfoList(9, 1, DatabaseProvider.GetInstance().GetGoodsPriceCondition((int)MallUtils.OperaCode.Equal, 1), "goodsid", 1); recommend_goodsinfocoll = Goods.GetGoodsInfoList(10, 1, DatabaseProvider.GetInstance().GetGoodsRecommendCondition((int)MallUtils.OperaCode.Equal, 1), "goodsid", 1); goodscategory = GoodsCategories.GetRootGoodsCategoriesJson(); rootgoodscategoryarray = GoodsCategories.GetShopRootCategory(); }