Advertisement
Guest User

Untitled

a guest
Sep 1st, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.60 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4.  
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>Event Planner</title>
  7. <link href="style.css" rel="stylesheet" type="text/css">
  8. <script type="text/javascript">
  9.  
  10. </script>
  11.  
  12. </head>
  13.  
  14. <body>
  15. <table> <%
  16. String a=request.getParameter("accountno");
  17.  
  18. String d=request.getParameter("username");
  19. String e=request.getParameter("password");
  20. String b=request.getParameter("taccountno");
  21. String c=request.getParameter("amount");
  22. int cc=Integer.parseInt(c);
  23. try
  24. {
  25. Class.forName("com.mysql.jdbc.Driver");
  26. Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/eventdb?zeroDateTimeBehavior=convertToNull", "root", "1111");
  27. Statement st=con.createStatement();
  28. String str="select * from accountdetails where accno='"+a+"'";
  29. ResultSet rs=st.executeQuery(str);
  30.  
  31. if(rs.next())
  32. {
  33. String aa=rs.getString("amount");
  34. if(aa.equals(""))
  35. {
  36. out.println("Specified Amount is Not Available in Your Account ");
  37. }
  38. else
  39. {
  40. int bb=Integer.parseInt(aa);
  41.  
  42. int dd=bb-cc;
  43.  
  44. String str1="update accountdetails set amount='"+dd+"' where userid='"+d+"'";
  45. int ee=st.executeUpdate(str1);
  46.  
  47. }}
  48. String str2="Select * from accountdetails where accno='"+b+"'";
  49. ResultSet rs1=st.executeQuery(str2);
  50.  
  51. if(rs1.next())
  52. {
  53. String ff=rs1.getString("amount");
  54. if(ff.equals(""))
  55. {
  56. out.println("Specified Amount Is Not Available");
  57. }
  58. else
  59. {
  60. int gg=Integer.parseInt(ff);
  61.  
  62. int jj=gg+cc;
  63.  
  64. String str4="update accountdetails set amount='"+jj+"' where accno='"+b+"'";
  65. int ggg=st.executeUpdate(str4);
  66. if(ggg>0)
  67. {
  68. response.sendRedirect("transfer1.jsp");
  69. }
  70. }
  71.  
  72. }
  73.  
  74. }
  75. catch(Exception ex)
  76. {
  77. out.println(ex.getMessage());
  78. }
  79. %></table><%
  80. %>
  81.  
  82.  
  83. </table>
  84.  
  85.  
  86. <%@ page import="java.sql.*"%>
  87. <%@ page import="java.io.*" %>
  88. <%@ page import="javax.servlet.*"%>
  89. <%@ page import="g.*" %>
  90.  
  91. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  92.  
  93. <html>
  94. <head>
  95.  
  96. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  97. <title>Event Planner</title>
  98. <link href="style.css" rel="stylesheet" type="text/css">
  99. <script type="text/javascript">
  100. <%--function ctck()
  101. {
  102. var sds = document.getElementById("dum");
  103.  
  104. }--%>
  105. </script>
  106.  
  107. </head>
  108.  
  109. <body>
  110.  
  111. <div id="top_links">
  112.  
  113.  
  114. <div id="header">
  115. <h1>EVENT PLANNER<span class="style1"></span></h1>
  116. <h2>Your vision. Our innovation. Event solutions.</h2>
  117. </div>
  118.  
  119. <div id="navigation">
  120. <ul>
  121. <!--<li><a href="newaccount.jsp">NEW ACCOUNT</a></li>
  122. <li><a href="withdraw.jsp">WITHDRAW</a></li>
  123. <li><a href="balance1.jsp">BALANCE</a></li>-->
  124.  
  125. <li><a href="transfer1.jsp">TRANSFER</a></li>
  126. <li><a href="closeac1.jsp">CLOSE A/C</a></li>
  127. <li><a href="about.jsp">CONTACT US</a></li>
  128. </ul>
  129. </div>
  130.  
  131.  
  132.  
  133. <table style="width:897px; background:#FFFFFF; margin:0 auto;">
  134. <tr >
  135. <td width="300" valign="top" style="border-right:#666666 1px dotted;">
  136. <div id="services"><h1>Services</h1><br>
  137. <ul>
  138. <li><a href="#">www.eventplanner.com</a></li>
  139. <li><a href="#">www.eventplanner.com </a></li>
  140. <li><a href="#">www.eventplanner.com/forum.jsp</a></li>
  141. </ul>
  142.  
  143. </div>
  144. </td>
  145.  
  146. <td width="1200" valign="top">
  147.  
  148. <%
  149. %>
  150. <table> <%
  151. String a=request.getParameter("accountno");
  152.  
  153. String d=request.getParameter("username");
  154. String e=request.getParameter("password");
  155. String b=request.getParameter("taccountno");
  156. String c=request.getParameter("amount");
  157. int cc=Integer.parseInt(c);
  158. try
  159. {
  160. Class.forName("com.mysql.jdbc.Driver");
  161. Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/eventdb?zeroDateTimeBehavior=convertToNull", "root", "1111");
  162. Statement st=con.createStatement();
  163. String str="select * from accountdetails where accno='"+a+"'";
  164. ResultSet rs=st.executeQuery(str);
  165.  
  166. if(rs.next())
  167. {
  168. String aa=rs.getString("amount");
  169. if(aa.equals(""))
  170. {
  171. out.println("Specified Amount is Not Available in Your Account ");
  172. }
  173. else
  174. {
  175. int bb=Integer.parseInt(aa);
  176.  
  177. int dd=bb-cc;
  178.  
  179. String str1="update accountdetails set amount='"+dd+"' where userid='"+d+"'";
  180. int ee=st.executeUpdate(str1);
  181.  
  182. }}
  183. String str2="Select * from accountdetails where accno='"+b+"'";
  184. ResultSet rs1=st.executeQuery(str2);
  185.  
  186. if(rs1.next())
  187. {
  188. String ff=rs1.getString("amount");
  189. if(ff.equals(""))
  190. {
  191. out.println("Specified Amount Is Not Available");
  192. }
  193. else
  194. {
  195. int gg=Integer.parseInt(ff);
  196.  
  197. int jj=gg+cc;
  198.  
  199. String str4="update accountdetails set amount='"+jj+"' where accno='"+b+"'";
  200. int ggg=st.executeUpdate(str4);
  201. if(ggg>0)
  202. {
  203. response.sendRedirect("transfer1.jsp");
  204. }
  205. }
  206.  
  207. }
  208.  
  209.  
  210.  
  211.  
  212.  
  213. }
  214. catch(Exception ex)
  215. {
  216. out.println(ex.getMessage());
  217. }
  218. %></table><%
  219. %>
  220.  
  221.  
  222. </table>
  223.  
  224.  
  225. <%@ page import="java.sql.*"%>
  226. <%@ page import="java.io.*" %>
  227. <%@ page import="javax.servlet.*"%>
  228. <%@ page import="g.*" %>
  229.  
  230. <%@page import="java.sql.Statement"%>
  231. <%@page import="java.sql.DriverManager"%>
  232. <%@page import="java.sql.Connection"%>
  233. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  234. <!DOCTYPE html>
  235. <html>
  236. <head>
  237. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  238. <title>JSP Page</title>
  239. </head>
  240. <body>
  241. <%
  242. String a=request.getParameter("accountno");
  243.  
  244. String d=request.getParameter("username");
  245. String e=request.getParameter("password");
  246. String b=request.getParameter("taccountno");
  247. String c=request.getParameter("amount");
  248. int cc=Integer.parseInt(c);
  249. try
  250. {
  251. Class.forName("com.mysql.jdbc.Driver");
  252. Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/eventdb?zeroDateTimeBehavior=convertToNull", "root", "1111");
  253. Statement st=con.createStatement();
  254. String str="select * from accountdetails where accno='"+a+"'";
  255. ResultSet rs=st.executeQuery(str);
  256.  
  257. if(rs.next())
  258. {
  259. String aa=rs.getString("amount");
  260. if(aa.equals(""))
  261. {
  262. out.println("Specified Amount is Not Available in Your Account ");
  263. }
  264. else
  265. {
  266. int bb=Integer.parseInt(aa);
  267.  
  268. int dd=bb-cc;
  269.  
  270. String str1="update accountdetails set amount='"+dd+"' where userid='"+d+"'";
  271. int ee=st.executeUpdate(str1);
  272.  
  273. }}
  274. String str2="Select * from accountdetails where accno='"+b+"'";
  275. ResultSet rs1=st.executeQuery(str2);
  276.  
  277. if(rs1.next())
  278. {
  279. String ff=rs1.getString("amount");
  280. if(ff.equals(""))
  281. {
  282. out.println("Specified Amount Is Not Available");
  283. }
  284. else
  285. {
  286. int gg=Integer.parseInt(ff);
  287.  
  288. int jj=gg+cc;
  289.  
  290. String str4="update accountdetails set amount='"+jj+"' where accno='"+b+"'";
  291. int ggg=st.executeUpdate(str4);
  292. if(ggg>0)
  293. {
  294. response.sendRedirect("transfer1f.jsp");
  295. }
  296. }
  297.  
  298. }
  299.  
  300.  
  301.  
  302.  
  303.  
  304. }
  305. catch(Exception ex)
  306. {
  307. out.println(ex.getMessage());
  308. }
  309. %>
  310. </body>
  311. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement