protected void Page_Load(object sender, System.EventArgs e) { Act.Pass(); Act.NoCache(); Db.Execute("EXEC spAppSignOut " + " '" + Act.UserID + "'" + ",'" + Act.IP + "'" ); Session.Abandon(); if (Request.QueryString["close"] == null) { if (Request.QueryString["pass"] == "1") { //Dari halaman ganti password : salah 3x Response.Redirect("/CustomError/Restricted.html"); } else { Response.Redirect("/"); } } else //close browser { Js.Close(this); } }
protected void ok_Click(object sender, EventArgs e) { if (filevalid()) { if (file.PostedFile.FileName.Length != 0) { string path = "D:\\ISC\\ISC064\\app\\security\\Foto\\" + Act.UserID + ".png"; string save = "security\\Foto\\" + Act.UserID + ".png"; Dfc.UploadFile(".jpg", path, file); Db.Execute("UPDATE USERNAME SET Foto ='" + save + "' WHERE UserID = '" + Act.UserID + "'"); } Js.Close(this); } }