earn

Friday, October 29, 2010

CEdit.jsp


                    CEdit.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>Customer Edit</title></head>
    <body>
       <div style="position: absolute; width: 997; height: 178; z-index: 1; left:0px; top: 36px; right: 2; bottom:1024" id="layer4"><div style="position: absolute; width: 181; height: 31; z-index: 1; left: 10px; top: -33px" id="layer1"><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: 148px; height: 219px; z-index: 1; left: -163px; top: -301px;right: 2" id="layer5"><!-- 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 ="Customer"><a href="CustomerList.jsp" title="Customer" style="background-image:url(images/btdxzy6.png);width:153px;height:25px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Add"><a href="CAdd.jsp" title="Add" style="background-image:url(images/bt5xzy6.png);width:153px;height:25px;display:block;"></a></td></tr>
</table></div>
<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>
<div style="position: absolute; left: 889px; top: 13px; width: 97px; height: 18px; z-index: 4" id="layer2"><a href="Home.jsp">Home</a>&nbsp;&nbsp;&nbsp;
<a href="CView.jsp">Back</a><div style="position: absolute; width: 1; height: 18; z-index: 1; left: 37px; top: 0px" id="layer3"><img border="0" src="images/htc.gif" width="1" height="18"></div></div><%
            Connection con=null;
            PreparedStatement ps=null;
            ResultSet rs=null;
            String Ccode=request.getParameter("Code");
            String FName=request.getParameter("EditFName");
           String LName=request.getParameter("EditLName");
            int rows=0;
            FName=FName.trim();
            LName=LName.trim();
            try{
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            con=DriverManager.getConnection("jdbc:odbc:SureVacCallDS","sa","P@ssw0rd");
           ps=con.prepareStatement("Update consumer set FName=?,LName=? where LoginId=?");
            ps.setString(1,FName);
            ps.setString(2,LName);
            ps.setString(3,Ccode);
            rows=ps.executeUpdate();
                if(rows!=0)    
                    {
                       %>
                       <div style="position: absolute; left: 189px; top: 316px; width: 445px; height: 25px; z-index: 5" id="layer9"><font size="4" face="Calibri" color="#0000FF">Data has been Updated successfully. To continue use the back link above.</font></div><div style="border-style:solid; border-color:#FFFFFF; position: absolute; left: 675px; top: 233px; width: 300; height: 300; z-index: 7; " id="layer10"><img border="0" src="images/done.png" width="299" height="300"></div>
                        <%
                                }
                                else
                                {
                                 %>
                        <div style="position: absolute; left: 189px; top: 316px; width: 445px; height: 25px; z-index: 5" id="layer9"><font size="4" face="Calibri" color="#0000FF">There are some invalid data::: Please try again</font></div>
                        <%
                                }
            }
            catch(Exception e)
            {
            %><div style="position: absolute; left: 189px; top: 316px; width: 445px; height: 25px; z-index: 5" id="layer9"><font size="4" face="Calibri" color="#0000FF">There are some invalid data::: Please try again</font></div>
                        <%}
            finally
            {
            con.close();
            }
            %>
     </body></html>

CDelete.jsp


             CDelete.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>Customer Delete</title> </head>
    <body>
        <div style="position: absolute; width: 997; height: 178; z-index: 1; left:0px; top: 36px; right: 2; bottom:1024" id="layer4">
                <div style="position: absolute; width: 181; height: 31; z-index: 1; left: 10px; top: -33px" id="layer1">
                                <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: 148px; height: 219px; z-index: 1; left: -163px; top: -301px;right: 2" id="layer5">
<!-- 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 ="Customer">
<a href="CustomerList.jsp" title="Customer" style="background-image:url(images/btdxzy6.png);width:153px;height:25px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Add">
<a href="CAdd.jsp" title="Add" style="background-image:url(images/bt5xzy6.png);width:153px;height:25px;display:block;"></a></td></tr>
</table></div>
                <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>
<div style="position: absolute; left: 889px; top: 13px; width: 97px; height: 18px; z-index: 4" id="layer2">
<a href="Home.jsp">Home</a>&nbsp;&nbsp;&nbsp;
<a href="CView.jsp">Back</a><div style="position: absolute; width: 1; height: 18; z-index: 1; left: 37px; top: 0px" id="layer3">
                <img border="0" src="images/htc.gif" width="1" height="18"></div>
</div>
        <%
      Connection con=null;
      PreparedStatement ps=null;
      ResultSet rs=null;
      String CLogin;
      int rows=0;
      CLogin=request.getParameter("Code");
      try
              {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              con=DriverManager.getConnection("jdbc:odbc:SureVacCallDS","sa","P@ssw0rd");
              ps=con.prepareStatement("Delete from Consumer where LoginId=?");
               ps.setString(1,CLogin);
               rows=ps.executeUpdate();
                if(rows!=0)    
                    {
                    %>
                       <div style="position: absolute; left: 189px; top: 316px; width: 445px; height: 25px; z-index: 5" id="layer9">
                <font size="4" face="Calibri" color="#0000FF">Data has been Deleted
                successfully. To continue use the back link above.</font></div>
        <div style="border-style:solid; border-color:#FFFFFF; position: absolute; left: 675px; top: 233px; width: 300; height: 300; z-index: 7; " id="layer10">
                <img border="0" src="images/done.png" width="299" height="300"></div>
                        <%
                                }
                                else
                                {
                                 %>
                        <div style="position: absolute; left: 189px; top: 316px; width: 445px; height: 25px; z-index: 5" id="layer9">
            <font size="4" face="Calibri" color="#0000FF">There are some invalid data::: Please try again</font></div>
                        <%
                                }
              }
              catch(Exception e)
                 {
                  %>
                        <div style="position: absolute; left: 189px; top: 316px; width: 445px; height: 25px; z-index: 5" id="layer9">
            <font size="4" face="Calibri" color="#0000FF">There are some invalid data::: Please try again</font></div>
                        <%
                  }
                  finally
                     {
                     con.close();
                     }
      %>
    </body>
</html>

CDescp.jsp


CDescp.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>Customer Description</title>
    </head>
    <body>
        <div style="position: absolute; width: 997; height: 178; z-index: 1; left:0px; top: 36px; right: 2; bottom:1024" id="layer4">
                <div style="position: absolute; width: 181; height: 31; z-index: 1; left: 10px; top: -33px" id="layer1">
                                <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: 148px; height: 219px; z-index: 1; left: -163px; top: -301px;right: 2" id="layer5">
<!-- 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 ="Customer">
<a href="Customer.jsp" title="Customer" style="background-image:url(images/btdxzy6.png);width:153px;height:25px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Add">
<a href="CAdd.jsp" title="Add" style="background-image:url(images/bt5xzy6.png);width:153px;height:25px;display:block;"></a></td></tr>
</table></div>
                <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>
<div style="position: absolute; left: 889px; top: 13px; width: 97px; height: 18px; z-index: 4" id="layer2">
<a href="Home.jsp">Home</a>&nbsp;&nbsp;&nbsp;
<a href="CustomerList.jsp">Back</a><div style="position: absolute; width: 1; height: 18; z-index: 1; left: 37px; top: 0px" id="layer3">
                <img border="0" src="images/htc.gif" width="1" height="18"></div>
</div><%
        String SelectF=request.getParameter("Ccode");
       Connection con=null;
      PreparedStatement ps=null;
      ResultSet rs=null;
       String Pwd,FName,LName;
        SelectF=SelectF.trim();
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        try
                {
                con=DriverManager.getConnection("jdbc:odbc:SureVacCallDS","sa","P@ssw0rd");
            ps=con.prepareStatement("Select * from Consumer where LoginId=?");
               ps.setString(1,SelectF);
                rs=ps.executeQuery();
                %>
                <div style="border-style:groove; border-color:#0000FF; position: absolute; left: 857px; top: 418px; width: 111; height: 111; z-index: 7; " id="layer10"><img border="0" src="images/Database.jpg" width="111" height="111"></div><div style="position: absolute; left: 281px; top: 281px; width: 484px; height: 218px; z-index: 5" id="layer9"><%
                while(rs.next())
                    {
                   Pwd=rs.getString(2);
                   FName=rs.getString(3);
                   LName=rs.getString(4);
                   %>
                    <table border="0" width="100%" style="border-collapse: collapse" height="168">
                                <tr>
                                                <td width="150" align="left" height="40" valign="top">
                                                <font face="Calibri" size="4" color="#0000FF">Login Name :</font></td>
                                                <td align="left" height="40" valign="top">
                                                <font face="Calibri" size="4" color="#0000FF"><%=SelectF%></font></td>
</td></tr><tr>
                                                <td width="150" align="left" height="40" valign="top">
                                                <font face="Calibri" size="4" color="#0000FF">Password :</font></td>
                                                <td align="left" height="40" valign="top"><font face="Calibri" size="4" color="#0000FF"><%=Pwd%></font></td></tr>
                                <tr>
                                                <td width="150" height="40" align="left" valign="top">
                                                <font face="Calibri" size="4" color="#0000FF">First Name :</font></td>
                                                <td align="left" height="40" valign="top"><font face="Calibri" size="4" color="#0000FF"><%=FName%></font></td>
                                </tr><tr>
                                                <td width="150" align="left" height="40" valign="top">
                                                <font face="Calibri" size="4" color="#0000FF">Last Name :</font></td>
                                                <td align="left" height="40" valign="top"><font face="Calibri" size="4" color="#0000FF"><%=LName%></font></td>
                                </tr></table></div><%
                    }
                }
                catch(Exception e)
                {
                 %>     
                 <div style="border:3px double #FFFFFF; position: absolute; left: 854px; top: 409px; width: 124; height: 124; z-index: 7" id="layer10">
                <img border="0" src="images/CA9QD8DV.jpg" width="124" height="124"></div><div style="position: absolute; left: 251px; top: 283px; width: 445px; height: 25px; z-index: 5" id="layer9"><table border="0" width="100%"><tr><td><font face="Calibri" size="4" color="#0000FF">Go back and please select a Franchisee to view its details.</td></tr></table></div><%
                }finally
                {
                    con.close();
                } %></body></html>

CustomerList.jsp


CustomerList.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>Customer List</title>  </head>
    <body><form method="post" action="CDescp.jsp">
     <div style="position: absolute; width: 997; height: 178; z-index: 1; left:0px; top: 36px; right: 2; bottom:1024" id="layer4">
                <div style="position: absolute; width: 181; height: 31; z-index: 1; left: 10px; top: -33px" id="layer1">
                                <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: 148px; height: 219px; z-index: 1; left: -163px; top: -301px;right: 2" id="layer5">
<!-- 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 ="Customer">
<a href="CustomerList.jsp" title="Customer" style="background-image:url(images/btdxzy6.png);width:153px;height:25px;display:block;"><br/></a></td></tr>
<tr><td style="padding-bottom:15px" title ="Add">
<a href="CAdd.jsp" title="Add" style="background-image:url(images/bt5xzy6.png);width:153px;height:25px;display:block;"></a></td></tr>
</table></div>
                <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><div style="position: absolute; left: 889px; top: 13px; width: 97px; height: 18px; z-index: 4" id="layer2"><a href="Home.jsp">Home</a>&nbsp;&nbsp;&nbsp;
<a href="Customer.jsp">Back</a><div style="position: absolute; width: 1; height: 18; z-index: 1; left: 37px; top: 0px" id="layer3"><img border="0" src="images/htc.gif" width="1" height="18"></div></div>       
    <%
            Connection con=null;
            Statement s1=null;
            ResultSet rs=null;
            String Customer;
            try
            {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            con=DriverManager.getConnection("jdbc:odbc:SureVacCallDS","sa","P@ssw0rd");
            s1=con.createStatement();
            rs=s1.executeQuery("Select LoginId from consumer");
             %>
            <div style="border-style:groove; border-color:#0000FF; position: absolute; left: 857px; top: 418px; width: 111; height: 111; z-index: 7; " id="layer10"><img border="0" src="images/imagesArrow.jpg" width="111" height="111"></div><div style="position: absolute; left: 353px; top: 255px; width: 260px; height: 25px; z-index: 5" id="layer9"><table border="0" width="100%">
            <%
            while(rs.next())
            {
                Customer=rs.getString(1);
             %>
            <tr><td nowrap align="left">
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="Ccode" value="<%=Customer%>" checked="checked"> <%=Customer%></div></td></tr>
                 <%}
            %>
            <tr><td><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="Submit" name="SUBMIT">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="Reset" name="Cancel"></td></tr></table <%
            }
            catch(Exception e)
            {
            out.println("Error"+e);
            }
            finally
            {con.close();}
            %></form></body></html>