Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Event Planner</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- <script type="text/javascript">
- </script>
- </head>
- <body>
- <table> <%
- String a=request.getParameter("accountno");
- String d=request.getParameter("username");
- String e=request.getParameter("password");
- String b=request.getParameter("taccountno");
- String c=request.getParameter("amount");
- int cc=Integer.parseInt(c);
- try
- {
- Class.forName("com.mysql.jdbc.Driver");
- Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/eventdb?zeroDateTimeBehavior=convertToNull", "root", "1111");
- Statement st=con.createStatement();
- String str="select * from accountdetails where accno='"+a+"'";
- ResultSet rs=st.executeQuery(str);
- if(rs.next())
- {
- String aa=rs.getString("amount");
- if(aa.equals(""))
- {
- out.println("Specified Amount is Not Available in Your Account ");
- }
- else
- {
- int bb=Integer.parseInt(aa);
- int dd=bb-cc;
- String str1="update accountdetails set amount='"+dd+"' where userid='"+d+"'";
- int ee=st.executeUpdate(str1);
- }}
- String str2="Select * from accountdetails where accno='"+b+"'";
- ResultSet rs1=st.executeQuery(str2);
- if(rs1.next())
- {
- String ff=rs1.getString("amount");
- if(ff.equals(""))
- {
- out.println("Specified Amount Is Not Available");
- }
- else
- {
- int gg=Integer.parseInt(ff);
- int jj=gg+cc;
- String str4="update accountdetails set amount='"+jj+"' where accno='"+b+"'";
- int ggg=st.executeUpdate(str4);
- if(ggg>0)
- {
- response.sendRedirect("transfer1.jsp");
- }
- }
- }
- }
- catch(Exception ex)
- {
- out.println(ex.getMessage());
- }
- %></table><%
- %>
- </table>
- <%@ page import="java.sql.*"%>
- <%@ page import="java.io.*" %>
- <%@ page import="javax.servlet.*"%>
- <%@ page import="g.*" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Event Planner</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- <script type="text/javascript">
- <%--function ctck()
- {
- var sds = document.getElementById("dum");
- }--%>
- </script>
- </head>
- <body>
- <div id="top_links">
- <div id="header">
- <h1>EVENT PLANNER<span class="style1"></span></h1>
- <h2>Your vision. Our innovation. Event solutions.</h2>
- </div>
- <div id="navigation">
- <ul>
- <!--<li><a href="newaccount.jsp">NEW ACCOUNT</a></li>
- <li><a href="withdraw.jsp">WITHDRAW</a></li>
- <li><a href="balance1.jsp">BALANCE</a></li>-->
- <li><a href="transfer1.jsp">TRANSFER</a></li>
- <li><a href="closeac1.jsp">CLOSE A/C</a></li>
- <li><a href="about.jsp">CONTACT US</a></li>
- </ul>
- </div>
- <table style="width:897px; background:#FFFFFF; margin:0 auto;">
- <tr >
- <td width="300" valign="top" style="border-right:#666666 1px dotted;">
- <div id="services"><h1>Services</h1><br>
- <ul>
- <li><a href="#">www.eventplanner.com</a></li>
- <li><a href="#">www.eventplanner.com </a></li>
- <li><a href="#">www.eventplanner.com/forum.jsp</a></li>
- </ul>
- </div>
- </td>
- <td width="1200" valign="top">
- <%
- %>
- <table> <%
- String a=request.getParameter("accountno");
- String d=request.getParameter("username");
- String e=request.getParameter("password");
- String b=request.getParameter("taccountno");
- String c=request.getParameter("amount");
- int cc=Integer.parseInt(c);
- try
- {
- Class.forName("com.mysql.jdbc.Driver");
- Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/eventdb?zeroDateTimeBehavior=convertToNull", "root", "1111");
- Statement st=con.createStatement();
- String str="select * from accountdetails where accno='"+a+"'";
- ResultSet rs=st.executeQuery(str);
- if(rs.next())
- {
- String aa=rs.getString("amount");
- if(aa.equals(""))
- {
- out.println("Specified Amount is Not Available in Your Account ");
- }
- else
- {
- int bb=Integer.parseInt(aa);
- int dd=bb-cc;
- String str1="update accountdetails set amount='"+dd+"' where userid='"+d+"'";
- int ee=st.executeUpdate(str1);
- }}
- String str2="Select * from accountdetails where accno='"+b+"'";
- ResultSet rs1=st.executeQuery(str2);
- if(rs1.next())
- {
- String ff=rs1.getString("amount");
- if(ff.equals(""))
- {
- out.println("Specified Amount Is Not Available");
- }
- else
- {
- int gg=Integer.parseInt(ff);
- int jj=gg+cc;
- String str4="update accountdetails set amount='"+jj+"' where accno='"+b+"'";
- int ggg=st.executeUpdate(str4);
- if(ggg>0)
- {
- response.sendRedirect("transfer1.jsp");
- }
- }
- }
- }
- catch(Exception ex)
- {
- out.println(ex.getMessage());
- }
- %></table><%
- %>
- </table>
- <%@ page import="java.sql.*"%>
- <%@ page import="java.io.*" %>
- <%@ page import="javax.servlet.*"%>
- <%@ page import="g.*" %>
- <%@page import="java.sql.Statement"%>
- <%@page import="java.sql.DriverManager"%>
- <%@page import="java.sql.Connection"%>
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>JSP Page</title>
- </head>
- <body>
- <%
- String a=request.getParameter("accountno");
- String d=request.getParameter("username");
- String e=request.getParameter("password");
- String b=request.getParameter("taccountno");
- String c=request.getParameter("amount");
- int cc=Integer.parseInt(c);
- try
- {
- Class.forName("com.mysql.jdbc.Driver");
- Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/eventdb?zeroDateTimeBehavior=convertToNull", "root", "1111");
- Statement st=con.createStatement();
- String str="select * from accountdetails where accno='"+a+"'";
- ResultSet rs=st.executeQuery(str);
- if(rs.next())
- {
- String aa=rs.getString("amount");
- if(aa.equals(""))
- {
- out.println("Specified Amount is Not Available in Your Account ");
- }
- else
- {
- int bb=Integer.parseInt(aa);
- int dd=bb-cc;
- String str1="update accountdetails set amount='"+dd+"' where userid='"+d+"'";
- int ee=st.executeUpdate(str1);
- }}
- String str2="Select * from accountdetails where accno='"+b+"'";
- ResultSet rs1=st.executeQuery(str2);
- if(rs1.next())
- {
- String ff=rs1.getString("amount");
- if(ff.equals(""))
- {
- out.println("Specified Amount Is Not Available");
- }
- else
- {
- int gg=Integer.parseInt(ff);
- int jj=gg+cc;
- String str4="update accountdetails set amount='"+jj+"' where accno='"+b+"'";
- int ggg=st.executeUpdate(str4);
- if(ggg>0)
- {
- response.sendRedirect("transfer1f.jsp");
- }
- }
- }
- }
- catch(Exception ex)
- {
- out.println(ex.getMessage());
- }
- %>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement