Exemple #1
0
        /// <summary>
        /// 得到最新推荐精华
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static List<BBSMain> BBSMainNewListByPush(byte type)
        {
            string key = "BBSMainNewListByPush" + type;
            List<BBSMain> data = (List<BBSMain>)HttpRuntime.Cache[key];
            if (data == null)
            {
                bizBBSMain b = new bizBBSMain();
                data = b.ListByPush(1, 0, type, 12);
                HttpRuntime.Cache.Add(key, data, null, DateTime.Now.AddMinutes(30), System.Web.Caching.Cache.NoSlidingExpiration, CacheItemPriority.High, null);
            }

            return data;
        }
Exemple #2
0
 public ActionResult NewsAdd()
 {
     int parentID = Request.QueryString["parentID"] == null ? 0 : int.Parse(Request.QueryString["parentID"].ToString());
     int typeID = Request.QueryString["typeID"] == null ? 0 : int.Parse(Request.QueryString["typeID"].ToString());
     int bbsMainID = Request.QueryString["bbsMainID"] == null ? 0 : int.Parse(Request.QueryString["bbsMainID"].ToString());
     string title = "";
     string content = "";
     string username = "";
     if (bbsMainID != 0)
     {
         bizBBSMain bm = new bizBBSMain();
         BBSMainRelationQuery model = bm.GetBBSMainDetail(bbsMainID);
         title = model.Title;
         username = model.UserName;
         string ubbContent = "";
         string htmlContent = "";
         ubbContent = MyText.ReplayUbbCode(model.Content);
         //if (model.FilePath != null && model.FilePath.Trim() != "" && model.FileType == 1)
         //{
         //    ubbContent += "\r\n[img]" + model.FilePath + "[/img]";
         //}
         //else if (model.FilePath != null && model.FilePath.Trim() != "" && model.FileType == 2)
         //{
         //    ubbContent += "\r\n[flash]" + model.FilePath + "[/flash]";
         //}
         //if (model.UpImages != null && model.UpImages.Trim() != "")
         //{
         //    ubbContent += "\r\n[img]" + model.UpImages + "[/img]";
         //}
         if(model.ContentType==1)
             htmlContent = MyText.ReplayCode(MyText.UbbCode(ubbContent), false);
         else
             htmlContent = MyText.ReplayCode(ubbContent, false);
         content = htmlContent;
     }
     bizNewsType bt = new bizNewsType();
     ViewData["Title"] = title;
     ViewData["TitleShort"] = title;
     ViewData["Content"] = content;
     ViewData["BBSMainID"] = bbsMainID;
     ViewData["TypeList"] = bt.ListByParent(parentID);
     ViewData["parentID"] = parentID;
     ViewData["typeID"] = typeID;
     ViewData["UserName"] = username;
     ViewData["Bar"] = MenuBar.Start()
         .AddMenu("��̳��Ѷ", "/AdminNews/NewsType/1101")
         .AddMenu("��Ϣ����","")
         .GetMenuHtml();
     return View();
 }
Exemple #3
0
        public ActionResult bbsImages()
        {
            bizBBSMain b = new bizBBSMain();
            List<BBSMain> list = b.List();
            foreach (var item in list)
            {
                BBSMain model = b.Get(item.BBSMainID);
                model.Attach();
                if (model.UpImages != null)
                    model.UpImages = model.UpImages.Replace("/userfiles/", "http://img1.woxx8.com/userfiles/");
                model.Detach();
                b.Update(model);
            }

            return View("UserQMSet");
        }
Exemple #4
0
        public ActionResult Move(int id)
        {
            bizBBSMain b = new bizBBSMain();
            BBSMain model = b.Get(id);
            if (model == null)
                TempData["Msg"] = "û�и���";
            if (!UserCommon.CheckBBSAdminRight(AdminType))
                TempData["Msg"] = "��û�иù��ܵ�Ȩ��";

            bizBBSTypes btypes = new bizBBSTypes();

            List<BBSTypes> listType = btypes.ListByMainID(model.TypeMainID);
            ViewData["typeMain"] = model.TypeMainID;
            ViewData["typeDe"] = model.TypeDeID;
            ViewData["ListType"] = listType;

            return View(model);
        }
Exemple #5
0
        public ActionResult UserJiRanse(int id)
        {
            bizBBSMain bm = new bizBBSMain();
            bizUserSkill bus = new bizUserSkill();
            BBSMain model = bm.Get(id);
            UserSkill modelSkill = bus.Get(5);
            List<Card> listCard = BBSCache.Instance().ListCard();
            bizUserXCard buc = new bizUserXCard();

            List<UserXCard> list = buc.ListByUser(UserID);
            ViewData["ModelSkill"] = modelSkill;
            ViewData["CardList"] = listCard;
            ViewData["UserCard"] = list;
            return View(model);
        }
Exemple #6
0
 public ActionResult UserJiQiqiu(int id)
 {
     bizBBSMain bm = new bizBBSMain();
     bizUserSkill bus = new bizUserSkill();
     BBSMain model = bm.Get(id);
     List<Card> listCard = BBSCache.Instance().ListCard();
     bizUserXCard buc = new bizUserXCard();
     UserSkill modelSkill = bus.Get(1);
     ViewData["ModelSkill"] = modelSkill;
     ViewData["CardList"] = listCard;
     ViewData["qiqiuNum"] = buc.GetCardNum(UserID, Enumerations.CardType.qiqiu.ToString());
     ViewData["bigqiqiuNum"] = buc.GetCardNum(UserID, Enumerations.CardType.bigqiqiu.ToString());
     return View(model);
 }
Exemple #7
0
 //
 // GET: /BBS/
 public ActionResult Default()
 {
     ViewData["typeMain"] = 1;
     ViewData["typeDe"] = 0;
     bizBBSMain b = new bizBBSMain();
     ViewData["PushList"] = b.ListPush(1, 0, 18);
     ViewData["UserDomain"] = ConfigurationManager.AppSettings["UserDomain"];
     bizSysInfo bs = new bizSysInfo();
     SysInfo bsModel = bs.Get(1);
     return View();
 }
Exemple #8
0
        /// <summary>
        /// 今日发帖总数
        /// </summary>
        /// <returns></returns>
        public int BBSTodayCount()
        {
            string SysName = CacheName.BBSTodayCount.ToString();
            string count=null;
            object value=null;
            if (SysCache.Contains(SysName))
            {
                value = SysCache.Get(SysName);
            }
            if (value != null)
                return int.Parse(value.ToString());

            bizBBSMain b = new bizBBSMain();
            bizBBSDE bd = new bizBBSDE();
            count = (b.CountByToday()+bd.CountByToday()).ToString();
            SysCache.Add(SysName, count, new AbsoluteTime(DateTime.Now.AddMinutes(10)));
            return int.Parse(count);
        }
Exemple #9
0
 public ActionResult DeleteMainSelf()
 {
     int bbsMainID = int.Parse(Request.Form["bbsMainID"].ToString());
     bizBBSMain b=new bizBBSMain();
     string result=b.DeleteSelf(bbsMainID, UserID);
     return Content(result);
 }
Exemple #10
0
        public ActionResult MainUpdate(FormCollection f)
        {
            bizBBSMain b = new bizBBSMain();
            byte types = b.GetBBSContentType(f["txtContent"]);
            string result = b.TopiceUpdate(int.Parse(f["bbsMainID"]), UserID,
                f["typeDeID"] == null ? 0 : int.Parse(f["typeDeID"]),
                CommonCache.FilterTextReplace(f["title"].Trim()), CommonCache.FilterTextReplace(f["txtContent"]), types,
                "",
                f["isShowTag"] == null || f["isShowTag"].ToString() == "false" ? byte.Parse("0") : byte.Parse("1")
                );

            if (result != "")
            {
                TempData["Msg"] = result;
                return RedirectToAction("MainUpdate", new { id = int.Parse(f["bbsMainID"]) });
            }
            else
            {
                return Redirect("/BBS/" + f["bbsMainID"] + ".html");
            }
        }
Exemple #11
0
        public ActionResult NoDelete(int id)
        {
            if (!UserCommon.CheckBBSAdminRight(AdminType))
                return Content("��û��Ȩ��ִ�д˲���");

            bizBBSMain b = new bizBBSMain();
            string result = b.DeleteByAdmin(id, UserID, UserName, "", false);
            if (result == "")
                return Content("ȡ��ɾ�������ɹ�");
            else
                return Content(result);
        }
Exemple #12
0
 public ActionResult Main(int typeMain, int typeDe)
 {
     ViewData["typeMain"] = typeMain;
     ViewData["typeDe"] = typeDe;
     bizBBSMain b = new bizBBSMain();
     List<BBSMain> list = b.ListPush(typeMain, typeDe, 30);
     ViewData["PushList"] = list;
     ViewData["TypeList"] = (new bizBBSTypes()).ListByMainID(typeMain);
     return View();
 }
Exemple #13
0
        public ActionResult MainUpdate(int id)
        {
            int userID = UserID;
            int kouJinbi=0;
            bizBBSMain b = new bizBBSMain();
            bizUsers bu = new bizUsers();
            Users modelUser = bu.Get(userID);
            BBSMain model=b.Get(id);
            if (model == null)
                Response.Redirect("/bbs/1/0/Main.html");
            if (model.AddUser != userID)
                Response.Redirect("/bbs/" + model.TypeMainID + "/" + model.TypeDeID + "/Main.html");

            ViewData["Alert"] = "��ʾ��";

            if (model.AddTime.AddDays(5) < DateTime.Now)
            {
                ViewData["Alert"] = "�޸ĸ�������ȡ��500�ɱ�����ѡ�";
            }
            if (model.AddTime.AddMinutes(10) < DateTime.Now)
            {
                kouJinbi+=1000;
            }
            if (model.Score > 0)
            {
                kouJinbi += model.Score * 2000;
                if (modelUser.FactionID == 0)
                    ViewData["Alert"] += "ɾ����������ȡ��" + kouJinbi + "�ɱ�����ѡ�";
                else
                    ViewData["Alert"] += "�����ڲ��䣬����������ɾ����";
            }
            else
            {
                if(kouJinbi>0)
                    ViewData["Alert"] += "ɾ����������ȡ��" + kouJinbi + "�ɱ�����ѡ�";
            }

            bizUserXCard uc = new bizUserXCard();
            bizBBSTypes btypes = new bizBBSTypes();
            bizInfoContent ic = new bizInfoContent();
            InfoContent iModel = ic.Get(model.ContentID);
            List<BBSTypes> listType;
            if ((AdminType & 4) == 4)
                listType = BBSCache.Instance().ListBBSTypeForAdmin(model.TypeMainID);
            else
                listType = BBSCache.Instance().ListBBSType(model.TypeMainID);

            if (iModel.ContentType == 1)
                ViewData["txtContent"] = MyText.UbbCode(iModel.Content);
            else
                ViewData["txtContent"] = iModel.Content;
            ViewData["typeMain"] = model.TypeMainID;
            ViewData["typeDe"] = model.TypeDeID;
            ViewData["ListType"] = listType;

            return View(model);
        }
Exemple #14
0
        /// <summary>
        /// �����б�
        /// </summary>
        /// <param name="typeMain">����ĿID</param>
        /// <param name="typeDe">����ĿID</param>
        /// <param name="showTypes">��ʾ��Ϣ������</param>
        /// <param name="orderTypes">����ʽ</param>
        /// <returns></returns>
        public ActionResult List(int typeMain,int typeDe,int showTypes,int orderTypes)
        {
            bizBBSMain b = new bizBBSMain();
            int count;
            int pageSize = 200;
            int page;
            string keyword;
            page = Request.QueryString["page"] == null ? 1 : int.Parse(Request.QueryString["page"].ToString());
            keyword = Request.QueryString["keyword"] == null ? "" : Request.QueryString["keyword"].ToString();

            ViewData["ShowBall"] = "no";
            if (showTypes == 0 && orderTypes == 1 && page == 1)
            {
                List<BBSMainBallList> ballList = b.ListByBall(typeMain, typeDe);
                ViewData["AdminBallList"] = b.ListByAdminBall(typeMain, typeDe);
                ViewData["BallList"] = ballList;
                ViewData["ShowBall"] = "yes";
            }

            List<BBSMain> list = b.ListPage(typeMain,typeDe,(Enumerations.BBSShowType)showTypes,(Enumerations.OrderTypes)orderTypes,keyword, UserID, pageSize,page, out count);
            ViewData["BBSMainPageList"] = bbs.GetBBSMainPageList(UserID, typeMain, typeDe, showTypes, orderTypes, keyword, count, pageSize, page);
            ViewData["typeMain"] = typeMain;
            ViewData["typeDe"] = typeDe;
            ViewData["showTypes"] = showTypes;
            ViewData["AdminType"] = AdminType;
            ViewData["TypeList"] = (new bizBBSTypes()).ListByMainID(typeMain);
            ViewData["ListBar"] = bbs.GetListBarHtml((Enumerations.BBSTypeMain)typeMain, (Enumerations.BBSShowType)showTypes);
            return View(list);
        }
Exemple #15
0
        public ActionResult EditReplay(FormCollection f)
        {
            int userID = UserID;
            int bbsMainID = int.Parse(f["bbsMainID"]);
            int bbsDeID = int.Parse(f["bbsDeID"]);
            bizBBSDE bde = new bizBBSDE();
            bizBBSMain bmain = new bizBBSMain();
            BBSMain modelMain = bmain.Get(bbsMainID);
            BBSDE model = bde.Get(bbsMainID, bbsDeID);
            if (modelMain == null)
                Response.Redirect("/bbs/1/0/Main.html");
            if (model == null)
                Response.Redirect("/bbs/1/0/Main.html");

            ViewData["Title"] = "<a target='_blank' href='/bbs/" + modelMain.BBSMainID + ".html'>" + modelMain.Title + "</a>";
            string result = bde.Update(bbsMainID, bbsDeID, userID, CommonCache.FilterTextReplace(f["txtContent"]), "",
                "",
                f["isShowTag"] == null || f["isShowTag"].ToString() == "false" ? byte.Parse("0") : byte.Parse("1")
                );
            if (result != "")
            {
                TempData["Msg"] = result;
                return Redirect("/bbs/EditReplay/" + bbsMainID + "-" + bbsDeID + ".html");
            }
            else
                return Redirect("/bbs/" + bbsMainID + ".html");
        }
Exemple #16
0
        public ActionResult EditReplay(int bbsMainID, int bbsDeID)
        {
            int userID = UserID;
            bizUsers bu = new bizUsers();
            Users modelUser = bu.Get(userID);

            if (bbs.GetLevels(modelUser.OnlineTime) < 2)
            {
                TempData["Msg"] = "2�����ϲſ��Ի�����������2��ֻ��Ҫ5����Ŷ��";
                return Redirect("/bbs/1/0/Main.html");
            }

            bizBBSDE bde = new bizBBSDE();
            bizBBSMain bmain = new bizBBSMain();
            BBSMain modelMain = bmain.Get(bbsMainID);
            BBSDE model = bde.Get(bbsMainID,bbsDeID);
            if (modelMain == null)
                return Redirect("/bbs/1/0/Main.html");
            if (model == null)
                return Redirect("/bbs/1/0/Main.html");

            ViewData["Alert"] = "";
            if (((DateTime)model.AddTime).AddDays(5) < DateTime.Now)
            {
                ViewData["Alert"] = "�����Ѿ�Զ���޸Ľ���ȡ��500�ɱң���ɱ����ȡ��1000�ɱ�����ѡ�";
            }

            ViewData["Title"] = "<a target='_blank' href='/bbs/" + modelMain.BBSMainID + ".html'>" + modelMain.Title + "</a>";
            ViewData["bbsMainID"] = bbsMainID;
            ViewData["bbsDeID"] = bbsDeID;
            return View(model);
        }
Exemple #17
0
        public ActionResult UserJiXianxing(int id)
        {
            int bbsDeID = int.Parse(Request.QueryString["deID"].ToString());
            bizBBSMain bm = new bizBBSMain();
            bizBBSDE bd = new bizBBSDE();
            bizUserSkill bus = new bizUserSkill();
            //BBSMain model = bm.Get(id);
            UserSkill modelSkill = bus.Get(6);
            List<Card> listCard = BBSCache.Instance().ListCard();
            bizUserXCard buc = new bizUserXCard();

            List<UserXCard> list = buc.ListByUser(UserID);
            ViewData["ModelSkill"] = modelSkill;
            ViewData["CardList"] = listCard;
            ViewData["UserCard"] = list;
            ViewData["ID"] = id;
            ViewData["deID"] = bbsDeID;
            if (bbsDeID == 0)
            {
                BBSMain modelMain = bm.Get(id);
                ViewData["IsNiming"] = modelMain.IsNiming;
            }
            else
            {
                BBSDE modelDe = bd.Get(id, bbsDeID);
                ViewData["IsNiming"] = modelDe.IsNiming;
            }
            return View();
        }
Exemple #18
0
        public ActionResult Post(FormCollection f,HttpPostedFileBase file1)
        {
            int userID = UserID;
            bizBBSMain b = new bizBBSMain();
            bizUsers bu = new bizUsers();
            Users modelUser = bu.Get(userID);
            if ((new bizUserForbid()).GetByUserID(userID) != null)
            {
                TempData["Msg"] = "�����ڽ����ڼ䣬�޷�������";
                return RedirectToAction("Post");
            }

            if (modelUser.Score - modelUser.UsedScore < 0)
            {
                TempData["Msg"] = "��Ļ���Ϊ���֣���ʱ�޷�������";
                return RedirectToAction("Post");
            }

            if (MyText.GetNoSpaceStr(f["txtContent"].ToString()).Trim().Length < 2)
            {
                TempData["Msg"] = "�������ݲ���С��2���ַ���";
                return RedirectToAction("Post");
            }

            if (bbs.GetLevels(modelUser.OnlineTime) < 2)
            {
                TempData["Msg"] = "2���ſ��Է�����������2��ֻ��Ҫ5����Ŷ��";
                return RedirectToAction("Post");
            }

            TempData["Title"] = f["title"].ToString().Trim();
            TempData["Content"] = f["txtContent"].ToString();

            //if (LastPostTime.AddSeconds(20) > DateTime.Now)
            //{
            //    TempData["Msg"] = "�㷢���ٶȹ��죬���Ժ��ٷ���";
            //    return RedirectToAction("Post");
            //}
            //else
            //{
            //    LastPostTime = DateTime.Now;
            //}
            if (MyText.CheckIsLike(b.GetPrevTitle(modelUser.UserID),f["title"].ToString().Trim()))
            {
                TempData["Msg"] = "����ʹ�ú��ϸ������Ƶı��⡣";
                return RedirectToAction("Post");
            }

            string title=f["title"].ToString().Trim();
            string titleColor="";
            string content=f["txtContent"].ToString();
            byte fileType = 1;
            string filePath = "";
            //byte fileType = byte.Parse(f["fileType"]);
            //string filePath=f["filePath"];
            //string face=f["face1"];
            //face = face == "0" ? "" : face + ".gif";
            byte isShowTag = f["isShowTag"] == null || f["isShowTag"].ToString() == "false" ? byte.Parse("0") : byte.Parse("1");
            byte isNiming = 0;
            if (f["NimingCard"] != null && f["NimingCard"] == "on")
                isNiming = 1;
            if (f["BigNimingCard"] != null && f["BigNimingCard"] == "on")
                isNiming = 2;
            byte chenmoType = 0;
            if (f["ChenmoCard"] != null && f["ChenmoCard"] == "on")
                chenmoType = 1;
            byte isVote = 0;
            if (f["chkVote"] != null && f["chkVote"] == "on")
                isVote = 1;
            if (f["NimingCard"] != null && f["NimingCard"] == "on")
                isNiming = 1;
            byte voteType = byte.Parse(f["voteType"]);
            string voteItems = f["txtVoteItem"].Trim().Replace("\r\n","&^^&");
            string username = modelUser.UserName;
            int addUser = modelUser.UserID;
            string addIP = Public.CommonHelper.GetIPAddress();
            string message=b.CheckAdd(addUser, title, content, isNiming, chenmoType);
            if (message != "")
            {
                TempData["Msg"] = message;
                return RedirectToAction("Post");
            }
            if (isVote == 1)
            {
                if (voteItems == "")
                {
                    TempData["Msg"] = "ͶƱ���Ϊ��";
                    return RedirectToAction("Post");
                }
            }
            if (file1 != null)
            {
                string imagePath;
                int typeID;
                bizUserImageType bt = new bizUserImageType();
                UserImageType modelType = bt.GetByDefault(userID);
                typeID = modelType == null ? 0 : modelType.UserImageTypeID;
                TempData["Msg"] = Public.ImageHelper.ImageUpOfBbs(userID, file1, typeID, out imagePath);
                if (TempData["Msg"].ToString() != "")
                {
                    return RedirectToAction("Post");
                }
                content = content + "<br /><img src='"+ imagePath +"' border='0'><br />";
            }
            byte types = b.GetBBSContentType(content);
            int mainID = b.BBSMainAdd(int.Parse(f["typeMain"]),
                f["typeDeID"] == null ? 0 : int.Parse(f["typeDeID"]),
                CommonCache.FilterTextReplace(title), titleColor,2, CommonCache.FilterTextReplace(content), types, "", fileType, CommonCache.FilterTextReplace(filePath),"", isShowTag,
                isNiming, isVote, voteType, voteItems, username, addUser, chenmoType, addIP);

            if (mainID == 0)
            {
                TempData["Msg"] = "�㲻�ܷ���";
                return RedirectToAction("Post");
            }
            return Redirect("/BBS/"+mainID+".html");
        }
Exemple #19
0
 public ActionResult UserJiYujian(int id)
 {
     bizBBSMain bm = new bizBBSMain();
     bizUserSkill bus = new bizUserSkill();
     BBSMain model = bm.Get(id);
     UserSkill modelSkill = bus.Get(2);
     ViewData["ModelSkill"] = modelSkill;
     return View(model);
 }
Exemple #20
0
        public ActionResult Detail(int id, int page)
        {
            int count;
            int userID = UserID;
            bizBBSMain bm = new bizBBSMain();
            bizBBSDE bde = new bizBBSDE();
            bizNewsType bnt = new bizNewsType();
            bizNews bn = new bizNews();
            bizNewsContent bnn = new bizNewsContent();

            News model = bn.Get(id);
            NewsContent modelContent = bnn.Get(id, page);
            NewsType modelType = bnt.Get(model.NewsTypeID);
            BBSMain modelMain = bm.Get(model.BBSMainID);
            List<BBSDERelationQuery> list = bde.ListByNew(model.BBSMainID,modelMain.AddUser, 0, 20, out count);
            int pagecount = bnn.ListByNewsID(id).Count;

            modelMain.Attach();
            modelMain.HitNum = modelMain.HitNum + 1;
            modelMain.Detach();
            bm.Update(modelMain);

            ViewData["Bar"] = MenuBar.Start()
                .AddMenu("������Ѷ", "/")
                .AddMenu(modelType.TypeName, "/news/list/" + modelType.NewsTypeID + "_1.html")
                .AddMenu("����","")
                .GetMenuHtml();
            if (userID == 0)
                ViewData["Users"] = null;
            else
                ViewData["Users"] = (new bizUsers()).Get(userID);

            ViewData["HotList"] = BBSCache.Instance().ListNewByHot();
            ViewData["Count"] = count;
            ViewData["List"] = list;
            ViewData["Content"] = modelContent;
            ViewData["HitCount"] = modelMain.HitNum;
            ViewData["PageList"] = Page.GetPageList("/news/detail/" + model.NewsID + "_$page$.html", pagecount, 1, page);
            return View(model);
        }
Exemple #21
0
        public ActionResult Move(int id, FormCollection f)
        {
            bizBBSMain b = new bizBBSMain();
            BBSMain model = b.Get(id);
            if (model == null)
            {
                TempData["Msg"] = "û�и���";
                return RedirectToAction("Move", new { id = id });
            }
            if (!UserCommon.CheckBBSAdminRight(AdminType))
            {
                TempData["Msg"] = "��û�иù��ܵ�Ȩ��";
                return RedirectToAction("Move", new { id = id });
            }

            model.Attach();
            model.TypeDeID = int.Parse(f["typeDeID"]);
            model.Detach();
            b.Update(model);
            TempData["Msg"] = "ת�Ƴɹ�";
            return RedirectToAction("Move", new { id = id });
        }
Exemple #22
0
        public ActionResult ForbidMain()
        {
            int pageSize = 30;
            int page = Request.QueryString["page"] == null ? 1 : int.Parse(Request.QueryString["page"].ToString());
            int count;
            string username = Request.QueryString["username"] == null ? "" : Request.QueryString["username"].ToString().Trim();

            int? userID = null;
            string title = Request.QueryString["title"] == null ? "" : Request.QueryString["title"].ToString().Trim();
            if (username != "")
            {
                Users modelUser = (new bizUsers()).Get(username);
                if (modelUser != null)
                    userID = modelUser.UserID;
            }
            ViewData["username"] = username;
            ViewData["title"] = title;
            bizBBSMain b = new bizBBSMain();
            List<BBSMain> list = b.ListByDeleted(1, 0,title,userID, Enumerations.OrderTypes.����ʱ��, pageSize, page, out count);
            ViewData["PageList"] = Page.GetPageList("/AdminBBS/ForbidMain?username="******"&title=" + Server.HtmlEncode(title), count, pageSize, page, true);
            return View(list);
        }
Exemple #23
0
        public ActionResult FBBSMainList(int id)
        {
            bizBBSMain bbm = new bizBBSMain();
            int count;
            int pageSize = 50;
            int page;
            page = Request.QueryString["page"] == null ? 1 : int.Parse(Request.QueryString["page"].ToString());
            List<BBSMain> list = bbm.ListByFaction(1, 0, id, Enumerations.OrderTypes.����ʱ��, pageSize, page , out count);
            ViewData["PageList"] = Page.GetPageList("/Factions/FBBSMainList/" + id + ".html", count, pageSize, page,false );
            ViewData["ID"] = id;
            ViewData["Count"] = count;

            return View(list);
        }
Exemple #24
0
        public ActionResult DeleteMain(FormCollection f)
        {
            if (!UserCommon.CheckBBSAdminRight(AdminType))
                return JavaScript("<script language=javascript>alert('��û��Ȩ��ִ�д˲�����');window.close();</script>");

            int bbsMainID=int.Parse(f["bbsMainID"]);
            bizBBSMain b = new bizBBSMain();
            string result=b.DeleteByAdmin(bbsMainID, UserID, UserName, f["remark"].Trim(),true);
            if (result=="")
                return JavaScript("<script language=javascript>alert('ɾ���ɹ�');window.close();</script>");
            else
                return JavaScript("<script language=javascript>alert('" + result + "');window.close();</script>");
        }
Exemple #25
0
 public ActionResult BBSMainModList()
 {
     int prevHour = Request.QueryString["prevHour"] == null ? 48 : int.Parse(Request.QueryString["prevHour"].ToString());
     bizBBSMain b = new bizBBSMain();
     List<BBSMain> list = b.ListByMod(1, prevHour, 72, 200);
     return View(list);
 }
Exemple #26
0
 public ActionResult SetTop(int id)
 {
     bizBBSMain bm = new bizBBSMain();
     BBSMain model = bm.Get(id);
     ViewData["ID"] = id;
     return View(model);
 }
Exemple #27
0
        public ActionResult UnDeleteMain(int id)
        {
            bizBBSMain b = new bizBBSMain();
            b.DeleteByAdmin(id, UserID, UserName, "", false);

            return RedirectToAction("ForbidMain");
        }
Exemple #28
0
        public ActionResult UseCard(int id)
        {
            bizBBSMain bm = new bizBBSMain();
            bizCard c = new bizCard();
            bizUserXCard uc = new bizUserXCard();
            BBSMain model = bm.Get(id);
            List<Card> listCard = BBSCache.Instance().ListCard();
            bizUserXCard buc = new bizUserXCard();

            List<UserXCard> list = buc.ListByUser(UserID);
            ViewData["CardList"] = listCard;
            ViewData["UserCard"] = list;
            ViewData["bbsMainID"] = id;
            return View(model);
        }
Exemple #29
0
        public ActionResult UseCard(int id, FormCollection f)
        {
            int userID = UserID;
            bizBBSMain b = new bizBBSMain();
            string result = b.UseCard(userID, id, f["cardName"].Trim());
            if (f["cardName"] == "jilu")
            {
                if (result.Trim() != "")
                    return Content(result);

                bizBBSMainLog muc = new bizBBSMainLog();
                List<BBSMainLogDetail> list = muc.List(id);
                string str = "";
                if (list != null && list.Count > 0)
                {
                    foreach (BBSMainLogDetail item in list)
                    {
                        str = item.Remark + " �û���" + item.UserName + " ʱ�䣺" + item.AddTime + "\r\n" + str;
                    }
                }
                else
                    str = "û���˶Ը���ʹ�ù���Ƭ";
                return Content(str);
            }
            else
                return Content(result);
        }
Exemple #30
0
        public ActionResult Content(int id,int page)
        {
            int userID = UserID;
            bizBBSMain b = new bizBBSMain();
            bizBBSDE bde = new bizBBSDE();
            bizUserXCard uc = new bizUserXCard();

            BBSMainRelationQuery model = b.GetBBSMainDetail(id);
            if(model==null)
                return Redirect("/bbs/NoPage.html");
            if (UserCommon.CheckBBSAdminRight(AdminType) == false && model.DeleteType != 0)
                return Redirect("/bbs/NoPage.html");
            List<BBSTypes> listBBSType = (new bizBBSTypes()).ListByMainID(1);
            b.AddHit(id);
            int count;
            List<BBSDERelationQuery> list = bde.List(id, page-1, 50, out count);
            ViewData["List"] = list;
            ViewData["PageList"] = bbs.GetBBSContentPageList(id, count, page);
            ViewData["Page"] = page;
            ViewData["deID"] = 0;
            ViewData["ID"] = id;
            ViewData["AdminType"] = AdminType;
            ViewData["ShowAllQM"] = ShowAllQM;
            ViewData["ShowSelfQM"] = ShowSelfQM;
            ViewData["TypesName"] = SZXX.UI.Public.CommonHelper.GetBBSTypeName(listBBSType, model.TypeDeID);
            if (userID != 0)
            {
                ViewData["Niming"] = uc.GetCardNum(userID, "niming");
                ViewData["BigNiming"] = uc.GetCardNum(userID, "bigniming");
            }

            bizPopUp bp = new bizPopUp();
            DataSet pmodel = bp.GetNew(userID);
            if (pmodel != null)
            {
                //if (pmodel.Tables[0].Rows[0][2].ToString() == "1") //��ʾΪϵͳ��Ϣ
                //{
                //    if (SZXX.UI.Public.PublicHelper.GetCookie("PopInfoID") != pmodel.Tables[0].Rows[0][0].ToString())
                //    {
                //        ViewData["PopUp"] = pmodel;
                //        SZXX.UI.Public.PublicHelper.WriteCookie("PopInfoID", pmodel.Tables[0].Rows[0][0].ToString());
                //    }
                //    else
                //        ViewData["PopUp"] = null;
                //}
                //else
                if (ShowPopup)
                    ViewData["PopUp"] = pmodel;
                else
                    ViewData["PopUp"] = null;
            }

            return View(model);
        }