Пример #1
0
        public ActionResult Index()
        {
            if (Request.QueryString["token"] != null)
            {
                DBI dbi = new DBI();

                dbi.Execute("UPDATE paceLogins SET Active=0 WHERE Token='" + Request.QueryString["token"] + "'");
            }

            return(View());
        }
Пример #2
0
        public string Login(string username, string password)
        {
            if (username == "pacetc" && password == "pacetc")
            {
                string g = new Random().Next(0, 999999999).ToString();

                DBI dbi = new DBI();

                dbi.Execute("INSERT INTO paceLogins VALUES ('" + DateTime.Now.Date.ToString().Substring(0, 10) + "','" + DateTime.Now.TimeOfDay.ToString().Substring(0, 8) + "','" + g + "',1)");

                return(g);
            }
            else
            {
                return("f");
            }
        }