Advertisement
Guest User

poop

a guest
Feb 24th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. <%
  2. if((die1Value + die2Value < 7) && (request.getParameter("l") != null)){
  3. double cb = Double.parseDouble(session.getAttribute("balance").toString()) + Double.parseDouble(request.getParameter("amount"));
  4. session.setAttribute("balance", cb);
  5. int cc = Integer.parseInt(session.getAttribute("count").toString()) + 1;
  6. session.setAttribute("count", cc);
  7. %>
  8. <p>Current balance: <%=nf.format(cb)%></p>
  9. <p>Current bet: <%=nf.format(Double.parseDouble(request.getParameter("amount")))%></p>
  10. <p>Current bet type: <%=request.getParameter("l")%></p>
  11. <p>Your roll:</p>
  12. <%
  13. if(die1Value == 1){
  14. %>
  15. <img src="https://upload.wikimedia.org/wikipedia/commons/1/1b/Dice-1-b.svg"/>
  16. <%
  17. }
  18. %>
  19. <%
  20. if(die1Value == 2){
  21. %>
  22. <img src="https://upload.wikimedia.org/wikipedia/commons/5/5f/Dice-2-b.svg"/>
  23. <%
  24. }
  25. %>
  26. <%
  27. if(die1Value == 3){
  28. %>
  29. <img src="https://upload.wikimedia.org/wikipedia/commons/b/b1/Dice-3-b.svg"/>
  30. <%
  31. }
  32. %>
  33. <%
  34. if(die1Value == 4){
  35. %>
  36. <img src="https://upload.wikimedia.org/wikipedia/commons/f/fd/Dice-4-b.svg"/>
  37. <%
  38. }
  39. %>
  40. <%
  41. if(die1Value == 5){
  42. %>
  43. <img src="https://upload.wikimedia.org/wikipedia/commons/0/08/Dice-5-b.svg"/>
  44. <%
  45. }
  46. %>
  47. <%
  48. if(die1Value == 6){
  49. %>
  50. <img src="https://upload.wikimedia.org/wikipedia/commons/2/26/Dice-6-b.svg"/>
  51. <%
  52. }
  53. %>
  54. <%
  55. if(die2Value == 1){
  56. %>
  57. <img src="https://upload.wikimedia.org/wikipedia/commons/1/1b/Dice-1-b.svg"/>
  58. <%
  59. }
  60. %>
  61. <%
  62. if(die2Value == 2){
  63. %>
  64. <img src="https://upload.wikimedia.org/wikipedia/commons/5/5f/Dice-2-b.svg"/>
  65. <%
  66. }
  67. %>
  68. <%
  69. if(die2Value == 3){
  70. %>
  71. <img src="https://upload.wikimedia.org/wikipedia/commons/b/b1/Dice-3-b.svg"/>
  72. <%
  73. }
  74. %>
  75. <%
  76. if(die2Value == 4){
  77. %>
  78. <img src="https://upload.wikimedia.org/wikipedia/commons/f/fd/Dice-4-b.svg"/>
  79. <%
  80. }
  81. %>
  82. <%
  83. if(die2Value == 5){
  84. %>
  85. <img src="https://upload.wikimedia.org/wikipedia/commons/0/08/Dice-5-b.svg"/>
  86. <%
  87. }
  88. %>
  89. <%
  90. if(die2Value == 6){
  91. %>
  92. <img src="https://upload.wikimedia.org/wikipedia/commons/2/26/Dice-6-b.svg"/>
  93. <%
  94. }
  95. %>
  96. <p>Congratulations! You won <%=nf.format(Double.parseDouble(request.getParameter("amount")))%>.</p>
  97. <%
  98. }
  99. %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement