earn

Friday, October 29, 2010

ALoginCheck.jsp


ALoginCheck.jsp

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
   <%@ page language="java" import="java.sql.*" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Administrator Login Check</title>
    </head>
    <body>
                <div style="position: absolute; width: 997; height: 178; z-index: 1; left:0px; top: 36px; right: 2; bottom:1024" id="layer1">
                <div style="position: absolute; width: 181; height: 31; z-index: 1; left: 10px; top: -33px" id="layer5">
                                <img border="0" src="images/logo5.GIF" width="181" height="31"></div>
                <img border="0" src="images/contacttop-img.jpg" width="997" height="178"></div>
     <div style="position: absolute; width: 831px; height: 325px; z-index: 2; left: 166px; top: 225px" id="layer6">
                                <img border="0" src="images/bkg.gif" width="831" height="325"></div>
<div style="position: absolute; width: 831px; height: 19px; z-index: 3; left: 166px; top: 558px" id="layer7">
                <div style="position: absolute; width: 361px; height: 18px; z-index: 1; left: 194px; top: 20px" id="layer8" align="center">
                                <font size="3">Copyright © SureVac Call Management,&nbsp;2009. All Rights
                                Reserved.</font></div>
                <p>
                <img border="0" src="images/bg_footer.gif" width="832" height="32"></div>
     <br>  
       
<div style="position: absolute; width: 436px; height: 155px; z-index: 4; left: 196px; top: 287px" id="layer9">
<%
             String user=request.getParameter("login");
             String pwd=request.getParameter("password");
             String name;
             PreparedStatement ps;
             Connection con=null;
             ResultSet rs=null;
                user=user.trim();
                pwd=pwd.trim();
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
             try
             {
             con=DriverManager.getConnection("jdbc:odbc:SureVacCallDS","sa","P@ssw0rd");
             ps=con.prepareStatement("select * from users where LoginId=?");
             ps.setString(1,user);
             rs=ps.executeQuery();
             if(rs.next())
             {
             if(user.equals(rs.getString(1).trim()) && pwd.equals(rs.getString(2).trim()))
             {
                 name=rs.getString(3);
             %>
        <div style="position: absolute; width: 148px; height: 354px; z-index: 1; left: -191px; top: -59px;right: 2" id="layer2">
<!-- Begin Free-Web-Buttons.com -->
<style>#web-buttons-idhyzy6 a{display:block;color:transparent;} #web-buttons-idhyzy6 a:hover{background-position:left bottom;}a#web-buttons-idhyzy6a {display:none}</style>
<table id="web-buttons-idhyzy6" width=0 cellpadding=0 cellspacing=0 border=0>
<tr><td style="padding-bottom:15px" title ="Home">
<a href="Home.jsp" title="Home" style="background-image:url(images/bthyzy6.png);width:153px;height:25px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Contact Us">
<a href="ContactUs.jsp" title="Contact Us" style="background-image:url(images/btkyzy6.png);width:153px;height:25px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="About Us">
<a href="AboutUs.jsp" title="About Us" style="background-image:url(images/btgyzy6.png);width:153px;height:25px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Products">
<a href="ProductList.jsp" title="Products" style="background-image:url(images/btjyzy6.png);width:153px;height:30px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Contract">
<a href="Contract.jsp" title="Administrator" style="background-image:url(images/bt7xzy6.png);width:153px;height:25px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Franchisee">
<a href="Franchisee.jsp" title="Franchisee" style="background-image:url(images/bt1xzy6.png);width:153px;height:25px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="User">
<a href="User.jsp" title="User" style="background-image:url(images/btcxzy6.png);width:153px;height:25px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Customer">
<a href="Customer.jsp" title="Customer" style="background-image:url(images/btdxzy6.png);width:153px;height:25px;display:block;"><br/></a></td></tr>
</table>
</div>
<div style="position: absolute; width: 1; height: 18; z-index: 3; left: 742px; top: -273px" id="layer12">
                <img border="0" src="images/htc.gif" width="1" height="18"></div>
<div style="border:3px groove #0000CC; position: absolute; width: 300; height: 300; z-index: 1; left: 473px; top: -54px; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px" id="layer10">
<img border="0" src="images/Administrator.jpg" width="300" height="300"></div>
<font color="#0000CC" face="Calibri" size="4">Hello <%=name%></font>
<div style="position: absolute; width: 131px; height: 24px; z-index: 2; left: 665px; top: -288px" id="layer11">
                <p style="line-height: 150%"><font color="#0000CC"><a href="AdminHome.jsp">
                Admin Home</a></font>&nbsp; <font color="#0000CC">&nbsp;&nbsp;&nbsp;<a href="ALogin.jsp">Back</a></font></div>
<p>
<font color="#0000CC" face="Calibri" size="4">Welcome to our site!!!</font></p>
<p><font color="#0000CC" face="Calibri" size="4">To go ahead use the AdminHome
link above.</font></p>
<p><font color="#0000CC" face="Calibri" size="4">To go back to the Home page use
the Back link above or use the Home link in the side menu bar.</font>
</div>
          <%                }
                 else
                     {%>
        <div style="position: absolute; width: 148px; height: 368px; z-index: 4; left: -191px; top: -64px;right: 2" id="layer2">
<!-- Begin Free-Web-Buttons.com -->
<style>#web-buttons-idhyzy6 a{display:block;color:transparent;} #web-buttons-idhyzy6 a:hover{background-position:left bottom;}a#web-buttons-idhyzy6a {display:none}</style>
<table id="web-buttons-idhyzy6" width=0 cellpadding=0 cellspacing=0 border=0>
<tr><td style="padding-bottom:15px" title ="Home">
<a href="Home.jsp" title="Home" style="background-image:url(images/bthyzy6.png);width:153px;height:30px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Contact Us">
<a href="ContactUs.jsp" title="Contact Us" style="background-image:url(images/btkyzy6.png);width:153px;height:30px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="About Us">
<a href="AboutUs.jsp" title="About Us" style="background-image:url(images/btgyzy6.png);width:153px;height:30px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Administrator">
<a href="ALogin.jsp" title="Administrator" style="background-image:url(images/btixzy6.png);width:153px;height:30px;display:block;"><br/></a></td></tr>
</table>
<div style="position: absolute; width: 150; height: 150; z-index: 1; left: 2px; top: 220px" id="layer13">
                <img border="0" src="images/error.jpg" width="150" height="150"></div>
</div>
<div style="position: absolute; width: 1; height: 18; z-index: 3; left: 707px; top: -273px" id="layer12">
                <img border="0" src="images/htc.gif" width="1" height="18"></div>
<div style="border:3px groove #0000CC; position: absolute; width: 256; height: 256; z-index: 1; left: 497px; top: -31px; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px" id="layer10">
<img border="0" src="images/AdministratorError.jpg" width="256" height="256"></div>
<font color="#0000CC" face="Calibri" size="4">Sorry the login details provided by you are incorrect.</font>
    <div style="position: absolute; width: 93px; height: 24px; z-index: 2; left: 665px; top: -288px" id="layer11">
                <p style="line-height: 150%"><a href="ALogin.jsp">Sign In</a>&nbsp; <font color="#0000CC">&nbsp;<a href="Home.jsp">Back</a></font></div>
<p>
<font color="#0000CC" face="Calibri" size="4">Please check the username and password again and sign in again.</font></p>
<p><font color="#0000CC" face="Calibri" size="4">Use the Sign In link above to go back to the Sign In page.</font></p>
<p><font color="#0000CC" face="Calibri" size="4">To go back to the Home page use the Back link above or the Home Menu alongside.</font>
</div>            
                    <% }
                }
                 else
                     {%>
                     <div style="position: absolute; width: 148px; height: 368px; z-index: 4; left: -191px; top: -64px;right: 2" id="layer2">
<!-- Begin Free-Web-Buttons.com -->
<style>#web-buttons-idhyzy6 a{display:block;color:transparent;} #web-buttons-idhyzy6 a:hover{background-position:left bottom;}a#web-buttons-idhyzy6a {display:none}</style>
<table id="web-buttons-idhyzy6" width=0 cellpadding=0 cellspacing=0 border=0>
<tr><td style="padding-bottom:15px" title ="Home">
<a href="Home.jsp" title="Home" style="background-image:url(images/bthyzy6.png);width:153px;height:30px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Contact Us">
<a href="ContactUs.jsp" title="Contact Us" style="background-image:url(images/btkyzy6.png);width:153px;height:30px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="About Us">
<a href="AboutUs.jsp" title="About Us" style="background-image:url(images/btgyzy6.png);width:153px;height:30px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Administrator">
<a href="ALogin.jsp" title="Administrator" style="background-image:url(images/btixzy6.png);width:153px;height:30px;display:block;"><br/></a></td></tr>
</table>
<div style="position: absolute; width: 150; height: 150; z-index: 1; left: 2px; top: 220px" id="layer13">
                <img border="0" src="images/error.jpg" width="150" height="150"></div>
</div>
<div style="position: absolute; width: 1; height: 18; z-index: 3; left: 707px; top: -273px" id="layer12">
                <img border="0" src="images/htc.gif" width="1" height="18"></div>
<div style="border:3px groove #0000CC; position: absolute; width: 256; height: 256; z-index: 1; left: 497px; top: -31px; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px" id="layer10">
<img border="0" src="images/AdministratorError.jpg" width="256" height="256"></div>
<font color="#0000CC" face="Calibri" size="4">Sorry the login details provided by you are incorrect.</font>
<div style="position: absolute; width: 93px; height: 24px; z-index: 2; left: 665px; top: -288px" id="layer11">
                <p style="line-height: 150%"><a href="ALogin.jsp">Sign In</a>&nbsp; <font color="#0000CC">&nbsp;<a href="Home.jsp">Back</a></font></div>
<p>
<font color="#0000CC" face="Calibri" size="4">Please check the username and password again and sign in again.</font></p>
<p><font color="#0000CC" face="Calibri" size="4">Use the Sign In link above to go back to the Sign In page.</font></p>
<p><font color="#0000CC" face="Calibri" size="4">To go back to the Home page use the Back link above or the Home Menu alongside.</font>
</div>            
                    <% }
                    }
                 catch(Exception e)
                 {
                  out.println("There are some invalid data::: "+"\n"+e);
                  }
                 finally
                     {
                     con.close();
                     }
                 %>
    </body></html>

No comments:

Post a Comment