<%@LANGUAGE="JAVASCRIPT"%> <% // *** Logout the current user. MM_Logout = String(Request.ServerVariables("URL")) + "?MM_Logoutnow=1"; if (String(Request("MM_Logoutnow"))=="1") { Session.Contents.Remove("MM_Username"); Session.Contents.Remove("MM_UserAuthorization"); var MM_logoutRedirectPage = "Socios.html"; // redirect with URL parameters (remove the "MM_Logoutnow" query param). if (MM_logoutRedirectPage == "") MM_logoutRedirectPage = String(Request.ServerVariables("URL")); if (String(MM_logoutRedirectPage).indexOf("?") == -1 && Request.QueryString != "") { var MM_newQS = "?"; for (var items=new Enumerator(Request.QueryString); !items.atEnd(); items.moveNext()) { if (String(items.item()) != "MM_Logoutnow") { if (MM_newQS.length > 1) MM_newQS += "&"; MM_newQS += items.item() + "=" + Server.URLencode(Request.QueryString(items.item())); } } if (MM_newQS.length > 1) MM_logoutRedirectPage += MM_newQS; } Response.Redirect(MM_logoutRedirectPage); } %> <% // *** Validate request to log in to this site. var MM_LoginAction = Request.ServerVariables("URL"); if (Request.QueryString != "") MM_LoginAction += "?" + Server.HTMLEncode(Request.QueryString); var MM_valUsername = String(Request.Form("Usuario")); if (MM_valUsername != "undefined") { var MM_fldUserAuthorization = "Nivel"; var MM_redirectLoginSuccess = "Socios.html"; var MM_redirectLoginFailed = "Historia.html"; var MM_loginSQL = "SELECT [Apellido 1], DNI"; if (MM_fldUserAuthorization != "") MM_loginSQL += "," + MM_fldUserAuthorization; MM_loginSQL += " FROM Federados2010 WHERE [Apellido 1] = ? AND DNI = ?"; var MM_rsUser_cmd = Server.CreateObject ("ADODB.Command"); MM_rsUser_cmd.ActiveConnection = MM_Usuarios_STRING; MM_rsUser_cmd.CommandText = MM_loginSQL; MM_rsUser_cmd.Parameters.Append(MM_rsUser_cmd.CreateParameter("param1", 200, 1, 255, MM_valUsername)); // adVarChar MM_rsUser_cmd.Parameters.Append(MM_rsUser_cmd.CreateParameter("param2", 5, 1, -1, Request.Form("Contraseña"))); // adDouble MM_rsUser_cmd.Prepared = true; var MM_rsUser = MM_rsUser_cmd.Execute(); if (!MM_rsUser.EOF || !MM_rsUser.BOF) { // username and password match - this is a valid user Session("MM_Username") = MM_valUsername; if (MM_fldUserAuthorization != "") { Session("MM_UserAuthorization") = String(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value); } else { Session("MM_UserAuthorization") = ""; } if (String(Request.QueryString("accessdenied")) != "undefined" && false) { MM_redirectLoginSuccess = Request.QueryString("accessdenied"); } MM_rsUser.Close(); Response.Redirect(MM_redirectLoginSuccess); } MM_rsUser.Close(); Response.Redirect(MM_redirectLoginFailed); } %> <% var Consulta__@@varName@@ = "@@defaultValue@@"; if (String(@@runtimeValue@@) != "undefined" && String(@@runtimeValue@@) != "") { Consulta__@@varName@@ = String(@@runtimeValue@@); } %> <% var Consulta = Server.CreateObject ("ADODB.Command"); Consulta.ActiveConnection = MM_Usuarios_STRING; Consulta.CommandText = "INSERT INTO Federados2010 (DNI, Apellido 1) VALUES ( ) "; Consulta.CommandType = 1; Consulta.CommandTimeout = 0; Consulta.Prepared = true; Consulta.Execute(); %> Banda enlaces
Identifícate para acceder al contenido             Se necesita un valor.  Se necesita un valor.   Desconectar