public ActionResult Login(string ru = "/", string pass = "") { var PassInWF = WebConfigurationManager.AppSettings["Password"]; if (PassInWF.Equals(pass)) { var clientId = LoginsProcessing.GetRequestId(System.Web.HttpContext.Current); var tr = System.Web.HttpContext.Current.Request.Headers["User-Agent"]; LoginsProcessing.Login(clientId, tr); Response.Redirect(string.IsNullOrEmpty(ru)?"/":ru); return(null); } return(View("~/Views/Login/Login.cshtml")); }
public ActionResult AccessLog(string xx = "/") { var ip = Request.Form["ActionRemove"]; //if (!string.IsNullOrEmpty(ip)) { var currentID = LoginsProcessing.GetRequestId(System.Web.HttpContext.Current); Logins.Logins_DeleteLog(ip); if (ip.Equals(currentID)) { Response.Redirect("/Login?ru=/Login/AccessLog"); return(null); } } var listAC = Logins.Logins_Get(); ViewBag.ListAccessLog = listAC; return(View("~/Views/Login/AccessLog.cshtml")); }