Advertisement
Guest User

persdata.aspx

a guest
May 21st, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.78 KB | None | 0 0
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonalData.aspx.cs" Inherits="DataBaseProject.Pages2.PersonalData" %>
  2.  
  3. <!DOCTYPE html>
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head runat="server">
  7. <title>Personal Data Form</title>
  8. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
  9. <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"/>
  10. <script src="../JS/PersonalData.js"></script>
  11. <style>
  12. body {
  13. background-image: url('Images/Magen_David.jpg');
  14. background-repeat: no-repeat;
  15. background-position: center top;
  16. background-attachment: fixed;
  17. background-size: 44%;
  18. margin-left: 50px;
  19. margin-bottom:20px;
  20. }
  21.  
  22. .Blood_Type {
  23. padding: 10px;
  24. width: 400px;
  25. }
  26.  
  27. .buttons3 {
  28. margin-left: 15px;
  29. border-radius: 15px 50px;
  30. }
  31.  
  32. #BadBlood {
  33. font-family: 'Times New Roman';
  34. color: red;
  35. }
  36.  
  37. #errCity {
  38. font-family: 'Times New Roman';
  39. color: red;
  40. }
  41.  
  42. </style>
  43. </head>
  44. <body style="background-image:url(Images/Magen_David.jpg)">
  45. <div style="margin-left: -50px" class="w3-container w3-red"><h1>Personal Data Form</h1></div>
  46. <form runat="server" >
  47. <p class="City">
  48. Choose your city:
  49.  
  50. <select <%--required--%> name="City" id="city" onchange="checkCity()">
  51. <option></option>
  52. <option style="width: 300px" class="w3-input w3-border w3-round-xxlarge" <%--required="true"--%> value="Nes Ziona">Nes Ziona</option>
  53. <option <%--required--%> value="Rehovot">Rehovot</option>
  54. <option <%--required--%> value="Gan Yavne">Gan Yavne</option>
  55. <option <%--required--%> value="Beit Hannan">Beit Hannan</option>
  56. <option <%--required--%> value="Kibutz Shiler">Kibutz Shiler</option>
  57. </select>
  58. </p>
  59. <div id="errCity">You must choose a city</div>
  60.  
  61.  
  62. <p>Please choose your blood type:</p>
  63. <p class="Blood_Type" <%--name="Blood_Type"--%> id="Blood_Type" onchange="checkBlood()">
  64. <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="A+" />A+
  65. <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="A-" />A-
  66. <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="B+" />B+
  67. <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="B-" />B-
  68. <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="AB+" />AB+
  69. <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="AB-" />AB-
  70. <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="O+" />O+
  71. <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="O-" />O-
  72. </p>
  73. <div id="BadBlood">You must choose your blood type</div>
  74.  
  75. <br />
  76.  
  77. <p class="Diseases" <%--name="Diseases"--%> id="Diseases">
  78. Please fill in any kind of chronic disease (for example - diabetes):
  79. <br /><br />
  80. <textarea style="width: 300px " class="w3-input w3-border w3-round-xxlarge" <%--required--%> id="Chronic_Diseases" name="Chronic_Diseases" placeholder="Diabetes, alergies/anaphylaxis,COPD,Asthma..."
  81. rows="10" cols="70" <%--id="Diseases"--%>> </textarea>
  82. </p>
  83. <input type="submit" value="Submit" name="submit2" id="Submit" class="buttons3"
  84. onclick="alert('Thanks for giving us youor medical data. We promise not to use it in order to harm you and hope we wont have to use it. Enjoy life!')"/>
  85.  
  86. </form>
  87.  
  88.  
  89.  
  90. <%
  91. Response.Write("bigbulbul1");
  92. Response.Write("name = " + Session["name"]);
  93. Response.Write("bday = " + Session["BDay"]);
  94. //Response.Write(ADOhelper.Insert("Ariel", "Lapidus", "0529565871", "wattoman7@gmail.com", "reeeee", "12-12-2002", "Pee", "Mee", "Ness Ziona", "B", ""));
  95. if (Request.Form["submit2"] != null)
  96. {
  97. string city = Request.Form["city"];
  98. string blood = Request.Form["Blood_Type"];
  99. string notes = Request.Form["Chronic_Diseases"];
  100.  
  101. if (ADOhelper.IsNewUser((string)Session["phone_num"] /*, (string)Session["password"])*/))
  102. {
  103. //string insert = "";
  104. //insert += $"INSERT INTO tblSignedUsers VALUES('{name}', '{name2}', '{phone_num}', '{email}', '{password}', '{BDay}', '{father}', '{mother}', '{city}', '{blood}', '{notes}')";
  105. Response.Write("bigbulbul");
  106. Response.Write(ADOhelper.Insert((string)Session["name"], (string)Session["name2"], (string)Session["phone_num"], (string)Session["email"], (string)Session["password"], (string)Session["BDay"], (string)Session["father"], (string)Session["mother"], city, blood, notes));
  107. Response.Redirect("/Pages/Home.aspx");
  108. }
  109. else
  110. {
  111. Response.Write("This phone number is already registered in the system");
  112. }
  113. }
  114.  
  115.  
  116.  
  117.  
  118. %>
  119.  
  120.  
  121.  
  122. </body>
  123. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement