Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dreamweaver ASP vbscript problema con login case sensitive

5 views
Skip to first unread message

roberto.l...@gmail.com

unread,
Dec 1, 2014, 4:21:03 AM12/1/14
to
Salve a tutti, ho un problema con il riconoscimento case sensitive nell'effettuare il LOGIN da una pagina generata con Dreamweaver, in poche parole vorrei che sullo username e la password venisse effettuato il riconoscimento della lettere maiuscole e minuscole. Ho provato a guardare un po' in giro, ma nulla da fare. Vi ringrazio anticipatamente per il vostro aiuto. Posto di seguito il codice della pagina.

====
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/conn_presenze.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("username"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization="abilitato"
MM_redirectLoginSuccess="pannello-ut.asp"
MM_redirectLoginFailed="loginerroraccess.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_conn_presenze_STRING
MM_rsUser.Source = "SELECT codice, password"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM utenti WHERE codice='" & Replace(MM_valUsername,"'","''") &"' AND password='" & Replace(Request.Form("password"),"'","''") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And true Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>LOGIN UTENTE</title>
<link href="css/formattazione.css" rel="stylesheet" type="text/css" />
</head>

<body>
<h1>GESTIONE PRESENZE </h1>
<form id="mod_login" name="mod_login" method="POST" action="<%=MM_LoginAction%>">
<table width="40%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="21%">USERNAME</td>
<td width="79%"><input name="username" type="text" id="username" size="30" maxlength="16" /></td>
</tr>
<tr>
<td>PASSWORD</td>
<td><input name="password" type="password" id="password" size="30" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="accedi" type="submit" id="accedi" value="Accedi" /></td>
</tr>
</table>
</form>
<p>Software realizzato da Roberto La Barbera<br />
&copy; copyright 2014 </p>
</body>
</html>
0 new messages