Exemple #1
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 #2
0
        /// <summary>
        /// 论坛的分类列表
        /// </summary>
        /// <returns></returns>
        public List<BBSTypes> ListBBSTypeForAdmin(int typeMain)
        {
            string SysName = CacheName.ListBBSTypeForAdmin.ToString() + typeMain;
            List<BBSTypes> list = null;

            if (SysCache.Contains(SysName))
            {
                list = SysCache.Get(SysName) as List<BBSTypes>;
            }

            if (list != null)
                return list;

            bizBBSTypes bt = new bizBBSTypes();
            list = bt.ListByMainID(1);
            SysCache.Add(SysName, list, new AbsoluteTime(DateTime.Now.AddHours(1)));
            return list;
        }
Exemple #3
0
        public ActionResult Post(int typeMain, int typeDe)
        {
            int userID = UserID;
            bizUserXCard uc = new bizUserXCard();
            bizBBSTypes b = new bizBBSTypes();
            bizUsers bu = new bizUsers();
            Users modelUser = bu.Get(UserID);
            List<BBSTypes> listType;
            if ((AdminType & 4)== 4)
                listType = BBSCache.Instance().ListBBSTypeForAdmin(typeMain);
            else
                listType = BBSCache.Instance().ListBBSType(typeMain);
            ViewData["typeMain"] = typeMain;
            ViewData["typeDe"] = typeDe;
            ViewData["ListType"] = listType;
            ViewData["Niming"] = uc.GetCardNum(userID, "niming");
            ViewData["BigNiming"] = uc.GetCardNum(userID, "bigniming");
            ViewData["Chenmo"] = uc.GetCardNum(userID, "chenmo");
            ViewData["toupiao"] = uc.GetCardNum(userID, "toupiao");
            ViewData["ShowSelfQM"] = ShowSelfQM;

            if ((new bizUserForbid()).GetByUserID(UserID) != null)
            {
                TempData["Msg"] = "�����ڽ����ڼ䣬�޷�������";
                return View();
            }

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

            if (TempData["Title"]==null)
                TempData["Title"] = "";
            if (TempData["Content"] == null)
                TempData["Content"] = "";
            return View();
        }
Exemple #4
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 #5
0
        public ActionResult Index(int typeMain, int typeDe)
        {
            string MainUrl = Request.QueryString["MainUrl"] == null ? "" : Request.QueryString["MainUrl"].ToString();
            string ShowTypes = Request.QueryString["ShowTypes"] == null ? "0" : Request.QueryString["ShowTypes"].ToString();
            int orderTypes = Request.QueryString["orderTypes"] == null ? 1 : int.Parse(Request.QueryString["orderTypes"].ToString());

            bizBBSTypes b = new bizBBSTypes();
            List<BBSTypes> list = BBSCache.Instance().ListBBSType(typeMain);

            //ViewData["TopUrl"] = "/BBS/" + typeMain + "/" + typeDe + "/Top.html";
            //ViewData["LeftTopUrl"] = "/BBS/" + typeMain + "/" + typeDe + "/LeftTop.html?ShowTypes=" + ShowTypes;
            if (ShowTypes != "0")
                ViewData["ListUrl"] = "/BBS/" + typeMain + "/" + typeDe + "/List.html";
            else
                ViewData["ListUrl"] = "/BBS/" + typeMain + "/" + typeDe + "/List-" + ShowTypes + "-" + orderTypes + ".html";

            if (MainUrl == "")
                ViewData["MainUrl"] = "/BBS/" + typeMain + "/" + typeDe + "/Main.html";
            else
                ViewData["MainUrl"] = MainUrl;

            string typeName = "���ӻ�";
            if (typeDe != 0)
                typeName = BBSCache.Instance().ListBBSTypeForAdmin(typeMain).Single(x => x.TypeDeID == typeDe).TypeFullName;
            ViewData["TypeName"] = typeName;
            ViewData["TypeMainName"] = bbs.GetTypeMainName(typeMain);
            ViewData["typeMain"] = typeMain;
            ViewData["typeDe"] = typeDe;
            ViewData["ShowTypes"] = ShowTypes;
            return View(list);
        }
Exemple #6
0
 public ActionResult Top(int typeMain,int typeDe)
 {
     bizBBSTypes b = new bizBBSTypes();
     List<BBSTypes> list = BBSCache.Instance().ListBBSType(typeMain);
     //ViewData["BBSTypesList"] = BBSCache.Instance().ListBBSType(typeMain);
     ViewData["TypeMainName"] = bbs.GetTypeMainName(typeMain);
     ViewData["typeMain"] = typeMain;
     ViewData["typeDe"] = typeDe;
     string typeName = "���ӻ�";
     if (typeDe != 0)
         typeName = BBSCache.Instance().ListBBSTypeForAdmin(typeMain).Single(x => x.TypeDeID == typeDe).TypeFullName;
     ViewData["TypeName"] = typeName;
     return View(list);
 }