protected void Page_Load(object sender, EventArgs e) { string returnUrl = (Page.Request.QueryString.ToString().Contains("returnUrl")) ? Page.Request.QueryString["returnUrl"] : string.Empty; Login1.DestinationPageUrl = returnUrl; Login1.Focus(); }
protected void Page_Load(object sender, EventArgs e) { //Label1.Text = "Уважаемые читатели! По техническим причинам Библиотека временно приостановит обслуживание читателей с 26 декабря 2018 года и до 26 марта 2019 года. <a href = \"https://libfl.ru/ru/news/inostranka-ogranichit-obsluzhivanie-chitateley-do-konca-yanvarya-2019-goda\">Подробности.</a>"; //mname == "VGBIL-OPAC"; //if (Server.MachineName == "VGBIL-OPAC") if (Server.MachineName == "VGBIL-OPAC") { Panel1.Visible = true; } CurReader = new Reader("", Request["id"]); if ((Request["litres"] == null) || (Request["litres"] == "0")) { litres = "0"; } if (Request["litres"] == "1") { litres = "1"; } MoveToHistoryEL(CurReader); HyperLink2.NavigateUrl = "http://opac.libfl.ru/WebRemoteReg/Default.aspx?id=" + Request["id"]; if (!Page.IsPostBack) { string f = System.AppDomain.CurrentDomain.BaseDirectory; Login1.PasswordRecoveryUrl = "~/PassRec_ChooseT.aspx?id=" + Request["id"]; Login1.Focus(); } }
protected void Page_Load(object sender, EventArgs e) { Header.DataBind(); Login1.Focus(); if (Request.QueryString["logout"] == null) { return; } // Otherwise, sign out: FormsAuthentication.SignOut(); string returnUrl = Request["returnUrl"]; string logoutUrl = System.Configuration.ConfigurationManager.AppSettings["N2.logout.url"]; if (string.IsNullOrEmpty(logoutUrl)) { logoutUrl = "login.aspx?returnUrl=."; } if (!string.IsNullOrEmpty(returnUrl)) { logoutUrl = returnUrl; } Response.Redirect(logoutUrl); }
protected void Page_Load(object sender, EventArgs e) { //mname == "VGBIL-OPAC"; //if (Server.MachineName == "VGBIL-OPAC") if (Server.MachineName == "VGBIL-OPAC") { Panel1.Visible = true; } CurReader = new Reader("", Request["id"]); if ((Request["litres"] == null) || (Request["litres"] == "0")) { litres = "0"; } if (Request["litres"] == "1") { litres = "1"; } MoveToHistoryEL(CurReader); HyperLink2.NavigateUrl = "http://opac.libfl.ru/WebRemoteReg/Default.aspx?id=" + Request["id"]; if (!Page.IsPostBack) { string f = System.AppDomain.CurrentDomain.BaseDirectory; Login1.PasswordRecoveryUrl = "~/PassRec_ChooseT.aspx?id=" + Request["id"]; Login1.Focus(); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { Session["LoginUsuario"] = null; } Login1.Focus(); }
protected void Page_Load(object sender, EventArgs e) { Login1.Focus(); if (Request.QueryString["logout"] == null) { return; } FormsAuthentication.SignOut(); Response.Redirect("login.aspx?returnUrl=Default.aspx"); }
private void ConfigureControlsEveryTime() { // Don't need the login link if we are already on the login page. this.ShowLogin = false; // Hide the search button if anonymous browsing is disabled, since the user can't search if they are not logged in. if (!this.AllowAnonymousBrowsing) { this.ShowSearch = false; } Login1.Focus(); }
protected void Page_Load(object sender, EventArgs e) { CurReader = new Reader("", ""); if (!Page.IsPostBack) { string f = System.AppDomain.CurrentDomain.BaseDirectory; Login1.Focus(); } SqlDataAdapter DA = new SqlDataAdapter(); DA.SelectCommand = new SqlCommand(); DA.SelectCommand.Connection = new SqlConnection(XmlConnections.GetConnection("/Connections/Turn")); if (Request["pin"] == null) { return; } if (Request["baza"] == null) { return; } if (Request["baza"] == "1") { DA.SelectCommand.CommandText = "select avtp.PLAIN avt,zagp.PLAIN zag from BJVVV..DATAEXT A " + " left join BJVVV..DATAEXT zag on A.IDMAIN = zag.IDMAIN and zag.MNFIELD = 200 and zag.MSFIELD = '$a' " + " left join BJVVV..DATAEXTPLAIN zagp on zag.ID = zagp.IDDATAEXT " + " left join BJVVV..DATAEXT avt on A.IDMAIN = avt.IDMAIN and avt.MNFIELD = 700 and avt.MSFIELD = '$a' " + " left join BJVVV..DATAEXTPLAIN avtp on avt.ID = avtp.IDDATAEXT " + " where A.IDMAIN = " + Request["PIN"]; } else if (Request["baza"] == "2") { DA.SelectCommand.CommandText = "select avtp.PLAIN avt,zagp.PLAIN zag from REDKOSTJ..DATAEXT A " + " left join REDKOSTJ..DATAEXT zag on A.IDMAIN = zag.IDMAIN and zag.MNFIELD = 200 and zag.MSFIELD = '$a' " + " left join REDKOSTJ..DATAEXTPLAIN zagp on zag.ID = zagp.IDDATAEXT " + " left join REDKOSTJ..DATAEXT avt on A.IDMAIN = avt.IDMAIN and avt.MNFIELD = 700 and avt.MSFIELD = '$a' " + " left join REDKOSTJ..DATAEXTPLAIN avtp on avt.ID = avtp.IDDATAEXT " + " where A.IDMAIN = " + Request["PIN"]; } else { return; } DataSet res = new DataSet(); int i = DA.Fill(res, "t"); Label1.Text = "Вы собираетесь поставить в очередь на оцифровку издание: <br/> <b>Автор:</b> " + res.Tables["t"].Rows[0]["avt"].ToString() + "; <b>Заглавие:</b> " + res.Tables["t"].Rows[0]["zag"].ToString() + "<br/><br/> Для выполнения этого действия необходимо авторизоваться <br/>"; }
protected void Page_Load(object sender, EventArgs e) { //string cadena = ConfigurationManager.ConnectionStrings["TeleBancaConnectionString"].ConnectionString; //SqlConnection cnx = new SqlConnection(cadena); //cnx.Open(); Login1.Focus(); if (!IsPostBack) { Session["intentos"] = "0"; } }
protected void Page_Load(object sender, EventArgs e) { // //if this is a fresh install, create a new user. // int nrUsers; Membership.GetAllUsers(0, 1, out nrUsers); if (nrUsers == 0) { LoginMultiView.SetActiveView(CreateUserView); //Membership.CreateUser("admin", "admin", "); } //Page.Form.DefaultFocus = Login1.FindControl("UserName").UniqueID; //Page.SetFocus(Login1); Login1.Focus(); //ID="LoginButton" if button is a Button. //ID="LoginLinkButton" if button is a link LinkButton. Page.Form.DefaultButton = Login1.FindControl("LoginButton").UniqueID; }
protected void Page_Load(object sender, EventArgs e) { Login1.Focus(); }
protected void Page_Load(object sender, EventArgs e) { Session["User"] = null; Login1.Focus(); }
protected void Page_Load(object sender, EventArgs e) { //need to work out... //when the user is logged-in but going to unauthorized page redirects to the dashboard page //same page forever...need to work out //if (!IsPostBack) //{ // if (User.Identity.IsAuthenticated) // { // var role = User.Identity. // string returnUrl = Request.QueryString["ReturnUrl"] as string; // if (returnUrl != null) // { // if (returnUrl.Contains("DashBoard%2fStudent") && roles.Contains("student")) // { // } // } // } //} //for test only //SqlMembershipProvider provider = new SqlMembershipProvider(); //HttpContext.Current.User. if (!IsPostBack) { Login1.Focus(); if (User.Identity.IsAuthenticated) { var user = User as CustomPrincipal; if (user != null) { //var reurl = FormsAuthentication.GetRedirectUrl(user.UserName, true); //if (!string.IsNullOrEmpty(reurl)) //{ // UpdateLoginTime(user.Id); // //FormsAuthentication.RedirectFromLoginPage(user.UserName,true); // Response.Redirect(reurl); //} //else { string returnUrl = Request.QueryString["ReturnUrl"] as string; if (returnUrl != null) { UpdateLoginTime(user.Id); var qs = Request.QueryString.ToString().Replace("ReturnUrl=", ""); var queries = qs.Split(new char[] { '&' }); var i = 0; foreach (var q in queries) { if (i > 0) { returnUrl += "&" + q; } i++; } Response.Redirect(returnUrl); } else { Response.Redirect("~/"); } } } //can't use redirect here.. because every time a page is requested it is called so we can't //go to any other page. } } }
protected void Page_Load(object sender, EventArgs e) { //設定登入控制項成為焦點 Login1.Focus(); }
protected void Page_Load(object sender, EventArgs e) { Login1.Focus(); if (ChangePassword1.Visible == true) { Label7.Visible = false; } SIFRA = Request.QueryString["oper"]; Calendar2.TodaysDate = DateTime.Now.AddDays(0); Calendar2.SelectedDate = Calendar2.TodaysDate; DATUM = Calendar2.SelectedDate.ToString(); DATUM = DATUM.Substring(0, 10); //DetailsView1.Visible = true; // pwdCoda = Request.QueryString["pwdCoda"]; Label1.Visible = false; Label1.Text = pwdCoda; // runu Label2.Visible = false; Label2.Text = Request.QueryString["oper"]; oper = Label2.Text; cg = Request.QueryString["chgpwd"]; Label4.Visible = true; if (cg != null) { //lChgPwd.Visible = true; if (cg == "OK" || cg == "PWD") { if (cg == "OK") { Label1.Visible = false; Label2.Visible = false; Label3.Visible = true; lChgPwd.Text = "Geslo je spremenjeno!"; } else { lChgPwd.Text = "Zamenjaj geslo!"; lChgPwd.Visible = false; Label4.Visible = false; ChangePassword1.Visible = true; Calendar2.Visible = false; DetailsView1.Visible = false; GridView1.Visible = false; GridView2.Visible = false; } } else { Label1.Visible = false; Label2.Visible = false; Label3.Visible = false; lChgPwd.Text = "Zamenjava gesla ni uspela!"; } } else { lChgPwd.Visible = false; } // Label1.Visible = true; // Label2.Visible = true; Label3.Visible = true; if (pwdCoda != null && pwdCoda != "VSP") { SqlConnectionStringBuilder dsRjavUIP = new SqlConnectionStringBuilder(); dsRjavUIP.UserID = "irrs_app"; dsRjavUIP.Password = "******"; dsRjavUIP.DataSource = "10.10.50.161"; SqlConnection conUIP = new SqlConnection(dsRjavUIP.ConnectionString); conUIP.Open(); sqlString = "select nd.PRI_IME from[UIP].[dbo].[UIP_EDC_LICODE] as lc inner join[UIP].[dbo].[UIP_NDUNAME] as un on un.UNAME=lc.UNAME inner join[UIP].[dbo].[UIP_NDELUPO] as nd on nd.SIFD=un.SIFD where lc.UNAME='" + Label2.Text + "' and lc.CODA='" + Label1.Text + "' and un.OZNAKA='EDC'"; SqlCommand commAmb = new SqlCommand(sqlString, conUIP); // SqlCommand commAmb = new SqlCommand("select * from [UIP].[dbo].UIP_EDC_LICODE", conUIP); using (SqlDataReader reader = commAmb.ExecuteReader()) { while (reader.Read()) { if (!reader.IsDBNull(0)) { Label5.Text = SIFRA; Label3.Text = "Prijavljeni ste kot " + (reader.GetString(0)); Label5.Visible = false; if (ChangePassword1.Visible == false) { Label6.Visible = true; Label7.Visible = true; Label8.Visible = true; } if (cg != "PWD") { DetailsView1.Visible = true; GridView2.Visible = true; Label7.Visible = true; GridView1.Visible = true; } } else { DetailsView1.Visible = false; } } //Label3.Text = "Prijavljeni ste kot TEXT "; } // Novo SqlConnectionStringBuilder dsM2 = new SqlConnectionStringBuilder(); dsM2.UserID = "irrs_app"; dsM2.Password = "******"; dsM2.DataSource = "moder2"; SqlConnection conM2Dat = new SqlConnection(dsM2.ConnectionString); conM2Dat.Open(); sqlString = " select convert (char(10),max(AD.DAY),104) as datum from [TSSPICA].[DBO].ANALYTICS_DAILY as AD " + "inner join [TSSPICA].[DBO].USERS as U on U.NO =AD.USER_NO WHERE U.ID='" + Label2.Text + "' AND AD.DAY <= getdate() and AD.PLANNED_TIME>0"; SqlCommand commDat = new SqlCommand(sqlString, conM2Dat); using (SqlDataReader reader = commDat.ExecuteReader()) { while (reader.Read()) { if (!reader.IsDBNull(0)) { Calendar2.TodaysDate = DateTime.Parse(reader.GetString(0)); Calendar2.SelectedDate = Calendar2.TodaysDate; } } } // end novo Login1.Visible = false; bChgPwd.Visible = true; bOdjava.Visible = true; } else { Login1.Visible = true; bChgPwd.Visible = false; bOdjava.Visible = false; Label4.Visible = false; if (pwdCoda == "VSP") { lVsp.Text = "Prijava ni uspela. Poizkusite ponovno."; lVsp.Visible = true; } } }