예제 #1
0
        //
        // GET: /UserCenter/

        public ActionResult About()
        {
            if (User != null && User.Identity != null &&
                User.Identity.Name != null && User.Identity.Name.Equals("*****@*****.**"))
            {
                return Redirect("~/Admin/About");
            }
            var about = new AboutModel()
            {
                UserCount = gloablCache.UserCount(),
                UserTodayCount = gloablCache.UserTodayCount(),
                InfoPublishAllCount = gloablCache.InfoPublishAllCount(),
                InfoPublishTodayCount = gloablCache.InfoPublishTodayCount(),
                InfoEndCount = gloablCache.InfoEndCount(),
                PrivateMessageCount = gloablCache.PrivateMessageCount(User.Identity.Name),
                PrivateMessageTodayCount = gloablCache.PrivateMessageTodayCount(User.Identity.Name)
            };
            return View(about);
        }
예제 #2
0
        //
        // GET: /Admin/

        #region Menu
        public ActionResult About()
        {
#if DEBUG
            var about = new AboutModel()
            {
                UserCount = gloablCache.UserCount(),
                UserTodayCount = gloablCache.UserTodayCount(),
                InfoPublishAllCount = gloablCache.InfoPublishAllCount(),
                InfoPublishTodayCount = gloablCache.InfoPublishTodayCount(),
                InfoEndCount = gloablCache.InfoEndCount(),
                PrivateMessageCount = gloablCache.PrivateMessageCount(User.Identity.Name),
                PrivateMessageTodayCount = gloablCache.PrivateMessageTodayCount(User.Identity.Name)
            };
            return View(about);
#else
            if (User.Identity.Name.Equals("*****@*****.**"))
            {
                var about = new AboutModel()
                {
                    UserCount = gloablCache.UserCount(),
                    UserTodayCount = gloablCache.UserTodayCount(),
                    InfoPublishAllCount = gloablCache.InfoPublishAllCount(),
                    InfoPublishTodayCount = gloablCache.InfoPublishTodayCount(),
                    InfoEndCount = gloablCache.InfoEndCount(),
                    PrivateMessageCount = gloablCache.PrivateMessageCount(User.Identity.Name),
                    PrivateMessageTodayCount = gloablCache.PrivateMessageTodayCount(User.Identity.Name)
                };
                return View(about);
            }
            else
            {
                return RedirectToAction("About", "UserCenter");
            }
#endif

        }