public IActionResult Edit(int id = 0)
        {
            UserDBModel db = new UserDBModel();

            if (Request.Cookies["userID"] != null)
            {
                id = Int32.Parse(Request.Cookies["userID"]);
            }
            else
            {
                return(RedirectToAction("/Home/Index/"));
            }
            UserModel user = db.GetUserById(id);

            return(View(user));
        }
        public IActionResult Index(int id = 0)
        {
            if (Request.Cookies["userID"] != null)
            {
                string userID = Request.Cookies["userID"];

                UserDBModel db   = new UserDBModel();
                UserModel   user = db.GetUserById(Int32.Parse(userID));
                //get the total novel uploaded

                return(View(user));
            }
            else
            {
                return(RedirectToAction("/Home/Index/"));
            }
        }
        public IActionResult Index(string id = "0")
        {
            UserDBModel db = new UserDBModel();

            if (Request.Cookies["userID"] != null)
            {
                id = Request.Cookies["userID"];
            }

            UserModel        user = db.GetUserById(Int32.Parse(id));
            List <UserModel> nv   = db.GetAllUser(user.fUsername, user.fPassword);

            if (!db.AdminChecking(Int32.Parse(id)))
            {
                return(RedirectToAction("../Home/Index"));
            }

            return(View(nv));
        }