25 lines
676 B
C#
25 lines
676 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
|
|
namespace Simulator.Controllers
|
|
{
|
|
public class LoginController : Controller
|
|
{
|
|
// GET: Login
|
|
public ActionResult Index(string password = null)
|
|
{
|
|
if((Session != null && Session["user"] != null && Session["user"] == "success" ) || (!string.IsNullOrEmpty(password) && password == "Labor-Stein2022!"))
|
|
{
|
|
Session["user"] = "success";
|
|
return RedirectToAction("Index", "Home");
|
|
}
|
|
else
|
|
{
|
|
return View();
|
|
}
|
|
}
|
|
}
|
|
} |