1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
<%@page import="java.sql.*"%>
<html>
<head>
<title>Erreur</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<%
Connection conn=null;
java.sql.Statement stmt1=null;
ResultSet result1=null;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String URL="jdbc:odbc:reservation";
Connection cn1=DriverManager.getConnection(URL);
stmt1 = cn1.createStatement();
String req1 = "select mot_passe,Login from acces";
result1 = stmt1.executeQuery(req1);
boolean ok=true;
while(result1.next())
{
String nom = result1.getString("Login");
String mot = result1.getString("mot_passe");
if ((request.getParameter("LOG").equals(nom)) && (request.getParameter("Mpas").equals(mot)))
ok=false;
}
%>
</head>
<body bgColor=#004080 link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" leftMargin=0 topMargin=0>
<p align="center"> </p>
<p align="center"> <strong><font color="cce0e0" size="+3" face="Georgia, Times New Roman, Times, serif"><em><font size="4" face="Verdana, Arial, Helvetica, sans-serif">Administrateur</font></em>
</font></strong>
<FORM name="forme1" method="post">
<p align="center"> </p>
<font face="Verdana, Arial, Helvetica, sans-serif">
<%if(!ok)
{
session.setAttribute("transvar","admin");%>
<jsp:forward page="fonctions.jsp" />
</font>
<div align="center"> <font face="Verdana, Arial, Helvetica, sans-serif">
<%
}
else
{%>
<CENTER><BR><BR><BR><BR><BR><FONT size=3><B><font color="#FFFFFF">Vérifiez votre identifiant ou votre mot de passe.<BR></font><BR>
<A href="javascript:history.back(-1);">Retour</A> </FONT> <font face="Verdana, Arial, Helvetica, sans-serif">
<% }
%>
</font></div>
</FORM>
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"></STRONG></FONT></P>
<%
}
catch (Exception ex) {
ex.printStackTrace();
out.print(ex.toString());
out.print(ex.getMessage());
}
try {
result1.close();
stmt1.close();
conn.close();
}
catch (Exception ex) {
ex.printStackTrace();
}
%>
</div>
</body>
</html> |
Partager