// GET: Writer public ActionResult Index() { var WriterValues = wm.GetList(); return(View(WriterValues)); }
// GET: Writer public ActionResult Index(int p = 1) { var WriterValues = wm.GetList().ToPagedList(p, 6); return(View(WriterValues)); }
public ActionResult Index() { var writer = writerManager.GetList(); return(View(writer)); }
public ActionResult Index() { var writerList = wm.GetList(); return(View(writerList)); }
public ActionResult Index() { var result = writerManager.GetList(); return(View(result)); }
public ActionResult Index() { var writerValues = wM.GetList(); return(View(writerValues)); }
public ActionResult WriterLogin(Writer writer) { string password = writer.WriterPassword.Trim(); string hashPassword = new CryptoHelper().ComputeSha256Hash(password); string key = "AAAAAAAAAAAA111111111111AAAAAAAAAAAA111111111111"; string iv = "AAAAAAAA11111111"; string mail = writer.WriterMail.Trim(); string cryptedMail = new CryptoHelper().Encrypt(mail, key, iv); //var writerUserInfo2 = writerLoginManager.GetWriter(writer.WriterMail, writer.WriterPassword); var writerUserInfo = writerManager.GetList().FirstOrDefault(x => x.WriterMail == cryptedMail && x.WriterPassword == hashPassword); if (writerUserInfo != null) { FormsAuthentication.SetAuthCookie(writerUserInfo.WriterMail, false); Session["WriterMail"] = writerUserInfo.WriterMail; var captcha = Request.Form["g-recaptcha-response"]; const string secret = "6LdmkncbAAAAAAJ3JiXuJQLAg9G-3quKomE2O6xo"; var restUrl = string.Format("https://www.google.com/recaptcha/api/siteverify?secret={0}&response={1}", secret, captcha); WebRequest req = WebRequest.Create(restUrl); HttpWebResponse resp = req.GetResponse() as HttpWebResponse; JsonSerializer serializer = new JsonSerializer(); CaptchaResult result = null; using (var reader = new StreamReader(resp.GetResponseStream())) { string resultObject = reader.ReadToEnd(); result = JsonConvert.DeserializeObject <CaptchaResult>(resultObject); } if (!result.Success) { ModelState.AddModelError("", "captcha mesajınız hatalı"); if (result.ErrorCodes != null) { ModelState.AddModelError("", result.ErrorCodes[0]); } } else { ViewBag.MessageRobot = "Kayıt Başarılı."; return(RedirectToAction("MyContent", "WriterPanelContent")); } return(RedirectToAction("WriterLogin")); } else { return(RedirectToAction("WriterLogin")); } }