Advertisement
Guest User

index.php

a guest
Sep 25th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.67 KB | None | 0 0
  1. <?php
  2. $date = date("d-m-Y", strtotime("today"));
  3. require("api/src/isdk.php");
  4. $app = new iSDK;
  5. if ($app->cfgCon("connectionName")) {
  6.  
  7. $contactId = $_REQUEST['id'];
  8.  
  9.  
  10. if (empty($contactId))
  11. {
  12. echo "There was an error (Error Code 1).<br>Please Contact Support.";
  13. exit;
  14. }
  15. $emailverification = $_REQUEST['email'];
  16. //Get Contact Details
  17. $returnFields = array('FirstName','LastName','Phone1','StreetAddress1','StreetAddress2','City','Birthday', 'Email','JobTitle');
  18. $query = array('Id' => $contactId);
  19. $contacts = $app->dsQuery("Contact",100,0,$query,$returnFields);
  20. $contact = $contacts[0];
  21.  
  22. if ($emailverification != $contact['Email'])
  23. {
  24. echo "There was an error (Error Code 2).<br>Please Contact Support.";
  25. exit;
  26. }
  27.  
  28. }
  29.  
  30. ?>
  31. <!DOCTYPE html>
  32. <html>
  33. <head>
  34. <meta name="viewport" content="width=device-width, initial-scale=1">
  35. <link href="assets/jquery.signaturepad.css" rel="stylesheet">
  36. <!--[if lt IE 9]><script src="../assets/flashcanvas.js"></script><![endif]-->
  37. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
  38. <style>
  39. body {
  40. /* background-color: #EAEAEA; */
  41. }
  42. .main {
  43. width: 700px;
  44. margin: 0 auto;
  45. font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  46. line-height: 16px;
  47. font-size: 13px;
  48. background-color: #FFFFFF;
  49. border-radius: 5px;
  50. padding: 20px;
  51. border: solid;
  52. border-width: 1px;
  53. border-color: #ccc;
  54. box-shadow: 0px 0px 20px -4px;
  55. margin-top: 20px
  56. }
  57. .vars {
  58. margin-top: 110px;
  59. }
  60. header {
  61. /* color: #97C857; */
  62. font-size: 0.9em;
  63. font-weight: 700;
  64. }
  65. header span {
  66. color: #000;
  67. }
  68. .logo {
  69. margin-bottom: 5px;
  70. text-align: right;
  71. width: 220px;
  72. float:right;
  73. }
  74. .highlight-mail {
  75. color: #97C857;
  76. text-decoration: underline;
  77. font-weight: bolder;
  78. }
  79. .footer-text {
  80. /* color: #97C857; */
  81. vertical-align: middle;
  82. font-size: 0.8em;
  83. width:100%;
  84. float: left;
  85. }
  86. .footer-img {
  87. margin: -20 40;
  88. }
  89. .recepient {
  90. font-weight: bold;
  91. color: #000;
  92. }
  93. .knowledge-center {
  94. margin: 0 auto;
  95. display: block;
  96. }
  97. .left_header {
  98. float: left;
  99. }
  100. .right_header {
  101. float: right;
  102. }
  103. .memberdetails
  104. {
  105. width:80% !important;
  106. height: 20px;
  107. }
  108. thead
  109. {
  110. font-weight: bold;
  111. }
  112. textarea
  113. {
  114. width: 99%;
  115. min-height: 50px;
  116. }
  117. .person input
  118. {
  119. padding: 5px 10px;
  120. }
  121. .error
  122. {
  123. border-style: solid;
  124. border-width: 3px;
  125. border-color: red;
  126. }
  127. .medical td {
  128. border: 1px solid black;
  129. padding: 5px;
  130. }
  131. .medical
  132. {
  133. width: 100%;
  134. border: 1px solid black;
  135. border-collapse: collapse;
  136. }
  137. .person td:nth-child(n) {
  138. font-weight:bold;
  139. }
  140. </style>
  141. </head>
  142. <body>
  143. <div class="main container-fluid">
  144. <div class="row">
  145. <header class="text-right" >
  146. <center><img src="logo.png" style="width: 300px;text-align: center"></center>
  147. <h3 style="text-align: center; font-size: 18px;">Participant Information<br>All personal information supplied is confidential**</h3>
  148. </header>
  149. </div>
  150. <form method="post" action="process.php" class="sigPad" id="form" style="width: 100%">
  151. <table width="100%" class="person">
  152. <tr>
  153. <td width="148">First Name:</td>
  154. <td width="540"><input name="firstname" type="text" class="memberdetails required" id="firstname" onchange="ChangeFirstName()" value="<?php echo $contact['FirstName'];?>"></td>
  155. </tr>
  156. <tr>
  157. <td>Last Name:</td>
  158. <td><input name="lastname" type="text" class="memberdetails required" id="lastname" value="<?php echo $contact['LastName'];?>"></td>
  159. </tr>
  160. <tr>
  161. <td>Birthday:</td>
  162. <td><input name="dob" type="date" class="memberdetails required" id="dob" value=""></td>
  163. </tr>
  164. <tr>
  165. <td>Address 1:</td>
  166. <td><input name="address1" type="text" class="memberdetails required" id="address1" value="<?php echo $contact['StreetAddress1'];?>"></td>
  167. </tr>
  168. <tr>
  169. <td>Address 2:</td>
  170. <td><input name="address2" type="text" class="memberdetails" id="address2" value="<?php echo $contact['StreetAddress2'];?>"></td>
  171. </tr>
  172. <tr>
  173. <td>City:</td>
  174. <td><input name="city" type="text" class="memberdetails required" id="city" value="<?php echo $contact['City'];?>"></td>
  175. </tr>
  176. <tr>
  177. <td>Mobile:</td>
  178. <td><input name="mobile" type="text" class="memberdetails required" id="mobile" value="<?php echo $contact['Phone1'];?>"></td>
  179. </tr>
  180. <tr>
  181. <td>Occupation:</td>
  182. <td><input name="occupation" type="text" class="memberdetails required" id="occupation" value="<?php echo $contact['JobTitle'];?>"></td>
  183. </tr>
  184. <tr>
  185. <td>Email Address:</td>
  186. <td><input name="email" type="text" class="memberdetails required" id="email" value="<?php echo $contact['Email'];?>"></td>
  187. </tr>
  188. <tr>
  189. <td>Doctors Name:</td>
  190. <td><input name="doctorname" type="text" class="memberdetails required" id="doctorname" ></td>
  191. </tr>
  192. <tr>
  193. <td>Doctors Phone:</td>
  194. <td><input name="doctorphone" type="text" class="memberdetails required" id="doctorphone" ></td>
  195. </tr>
  196. <tr>
  197. <td>Emergency Contact:</td>
  198. <td><input name="emergencycontact" type="text" class="memberdetails required" id="emergencycontact" ></td>
  199. </tr>
  200. <tr>
  201. <td>Phone:</td>
  202. <td><input name="emergencycontactphone" type="text" class="memberdetails required" id="emergencycontactphone" ></td>
  203. </tr>
  204. </table>
  205. <br>
  206. <br>
  207. <table class="medical">
  208. <thead>
  209. <tr>
  210. <td>Have you ever suffered from</td>
  211. <td>Yes/No</td>
  212. <td>If yes, please give details & complete section below</td>
  213. </tr>
  214. </thead>
  215. <tbody>
  216. <tr>
  217. <td>Heart Problems</td>
  218. <td>
  219. <select name="heartproblems" class="required">
  220. <option value=""></option>
  221. <option value="Yes">Yes</option>
  222. <option value="No">No</option>
  223. </select>
  224. </td>
  225. <td><textarea name="heartproblemsdetails"></textarea></td>
  226. </tr>
  227. <tr>
  228. <td>Respiratory Problems<br>1. Asthma<br>2. Other</td>
  229. <td>
  230. <select name="respiratoryproblems" class="required">
  231. <option value=""></option>
  232. <option value="Yes">Yes</option>
  233. <option value="No">No</option>
  234. </select>
  235. </td>
  236. <td><textarea name="respiratoryproblemsdetails"></textarea></td>
  237. </tr>
  238. <tr>
  239. <td>Allergies<br>1. Drugs/ointments<br>2. Insects<br>3. Other</td>
  240. <td>
  241. <select name="allergies" class="required">
  242. <option value=""></option>
  243. <option value="Yes">Yes</option>
  244. <option value="No">No</option>
  245. </select>
  246. </td>
  247. <td><textarea name="allergiesdetails"></textarea></td>
  248. </tr>
  249. <tr>
  250. <td>Diabetes</td>
  251. <td>
  252. <select name="diabetes" class="required">
  253. <option value=""></option>
  254. <option value="Yes">Yes</option>
  255. <option value="No">No</option>
  256. </select>
  257. </td>
  258. <td><textarea name="diabetesdetails"></textarea></td>
  259. </tr>
  260. <tr>
  261. <td>Blood Pressure</td>
  262. <td>
  263. <select name="bloodpressure" class="required">
  264. <option value=""></option>
  265. <option value="Yes">Yes</option>
  266. <option value="No">No</option>
  267. </select>
  268. </td>
  269. <td><textarea name="bloodpressuredetails"></textarea></td>
  270. </tr>
  271. <tr>
  272. <td>Recent Operation</td>
  273. <td>
  274. <select name="operation" class="required">
  275. <option value=""></option>
  276. <option value="Yes">Yes</option>
  277. <option value="No">No</option>
  278. </select>
  279. </td>
  280. <td><textarea name="operationdetails"></textarea></td>
  281. </tr>
  282. <tr>
  283. <td>Epilepsy</td>
  284. <td>
  285. <select name="epilepsy" class="required">
  286. <option value=""></option>
  287. <option value="Yes">Yes</option>
  288. <option value="No">No</option>
  289. </select>
  290. </td>
  291. <td><textarea name="epilepsydetails"></textarea></td>
  292. </tr>
  293. <tr>
  294. <td>Recent Illness</td>
  295. <td>
  296. <select name="recentillness" class="required">
  297. <option value=""></option>
  298. <option value="Yes">Yes</option>
  299. <option value="No">No</option>
  300. </select>
  301. </td>
  302. <td><textarea name="recentillnessdetails"></textarea></td>
  303. </tr>
  304. <tr>
  305. <td>Phobias</td>
  306. <td>
  307. <select name="phobias" class="required">
  308. <option value=""></option>
  309. <option value="Yes">Yes</option>
  310. <option value="No">No</option>
  311. </select>
  312. </td>
  313. <td><textarea name="phobiasdetails"></textarea></td>
  314. </tr>
  315. <tr>
  316. <td>Broken bones or sprains & strains</td>
  317. <td>
  318. <select name="brokenbones" class="required">
  319. <option value=""></option>
  320. <option value="Yes">Yes</option>
  321. <option value="No">No</option>
  322. </select>
  323. </td>
  324. <td><textarea name="brokenbonesdetails"></textarea></td>
  325. </tr>
  326. <tr>
  327. <td>Other</td>
  328. <td>
  329. <select name="other" class="required">
  330. <option value=""></option>
  331. <option value="Yes">Yes</option>
  332. <option value="No">No</option>
  333. </select>
  334. </td>
  335. <td><textarea name="otherdetails"></textarea></td>
  336. </tr>
  337. <tr>
  338. <td>Have you had your appendix removed?</td>
  339. <td>
  340. <select name="appendix" class="required">
  341. <option value=""></option>
  342. <option value="Yes">Yes</option>
  343. <option value="No">No</option>
  344. </select>
  345. </td>
  346. <td><textarea name="appendixdetails"></textarea></td>
  347. </tr>
  348. <tr>
  349. <td>Can you swim?</td>
  350. <td colspan="2">
  351. <select name="swim" class="required">
  352. <option value=""></option>
  353. <option value="Well">Well</option>
  354. <option value="Fair">Fair</option>
  355. <option value="Not al all">Not at all</option>
  356. </select>
  357. </td>
  358. </tr>
  359. <tr>
  360. <td>Do you suffer from any existing medical condition,<br> injury or impairments which may impact on any<br>activities you may do?</td>
  361. <td>
  362. <select name="medialcondition" class="required">
  363. <option value=""></option>
  364. <option value="Yes">Yes</option>
  365. <option value="No">No</option>
  366. </select>
  367. </td>
  368. <td><textarea name="medialconditiondetails"></textarea></td>
  369. </tr>
  370. </tbody>
  371. </table>
  372. <!--
  373. <p>Do you suffer from any existing medical condition, injury or impairments which may impact on any activities you may do?</p>
  374. <select name="medialcondition" class="required">
  375. <option value=""></option>
  376. <option value="Yes.">Yes</option>
  377. <option value="No">No</option>
  378. </select>
  379. -->
  380. <p>NOTE: If you answered yes to the last question, it is your responsibility to ensure you have spoken to your doctor or medical professional to ensure you are medically and physically sound and able to participate prior to commencing any of our programs.</p>
  381. <p><strong>Medicines</strong>: Please give details of any medicines or medication being carried or being consumed by you including dose, frequency and whether you will have taken any prior to the activities you are registered for with us.</p>
  382. <textarea name="medicines"></textarea>
  383. <p>I agree to pictures/images of me being used for promotional purposes, including but not limited to social media, print, video:</p>
  384. <select name="photos">
  385. <option value="Yes">Yes</option>
  386. <option value="No">No</option>
  387. </select>
  388. <p>**We use all reasonable means to protect the confidentiality of your health, medical and other personal information (together ‘Personal Data’) while in our possession or control. For full information on how we protect your Personal Data, please see our Privacy Policy on our website.</p>
  389. <p><strong>RELEASE OF LIABILITY AND INDEMNITY</strong></p>
  390. <p>I acknowledge that I participate in any activity at my own risk. I understand that my participation in any activity may include the risk of serious injury or even death from various causes including exertion, dehydration, and accidents with surroundings.</p>
  391. <p>I warrant that I am physically and mentally fit to participate safely in the activities that I have registered for.</p>
  392. <p>I release all representatives, employees, directors, affiliates and agents of Shepherd Consulting (Qld) Pty Ltd t/a Women’s Fitness Adventures from any and all liability, including but not limited to direct or indirect, special, consequential loss or injury and including any liability for negligence, claims, demands and proceedings arising out of or connected with my participation in any activity, including any activities organized by any related third party</p>
  393. <p>By signing this Release and Indemnity below, I am confirming that I am suitably fit and healthy to participate in this activity and that a doctor or medical professional has not advised me otherwise. I also confirm that I am 18 years of age or older and that I have read and fully understand these terms. (Alternatively I am the parent or legal guardian of the minor and I agree on behalf of the participant and will agree to indemnify any person, affiliate, representative, and third party providing or involved in the activities on the above terms.)</p>
  394. <p>Agreed and acknowledged</p>
  395. <br/>
  396. <label for="name">Print your name</label>
  397. <input type="text" name="name" id="name" class="name">
  398. <input type="hidden" name="contactId" value="<?php echo $_REQUEST['id'];?>">
  399. <p class="drawItDesc">Draw your signature into the box below using your mouse (computers or laptops), or finger (tablets, smartphones, iPad).</p>
  400. <ul class="sigNav">
  401. <!-- <li class="drawIt"><a href="#draw-it" >Draw It</a></li> -->
  402. <li class="clearButton"><a href="#clear">Clear</a></li>
  403. </ul>
  404. <div class="sig sigWrapper" style="height: 180px">
  405. <div class="typed"></div>
  406. <canvas class="pad" width="690" height="180"></canvas>
  407. <input type="hidden" name="output" class="output">
  408.  
  409. </div>
  410. <button type="submit" id="submit">I accept the terms of this agreement.</button>
  411. </form>
  412. </div>
  413. <script src="jquery.signaturepad.js"></script>
  414. <script>
  415. $(document).ready(function() {
  416. $('.sigPad').signaturePad({drawOnly:true});
  417.  
  418. $('input, textarea').change(function() {
  419. $(this).removeClass("error");
  420.  
  421.  
  422. });
  423.  
  424. $('form').submit(function(e) {
  425.  
  426. $('.required').removeClass("error");
  427. $('textarea').removeClass("error");
  428. var empty_flds = 0;
  429.  
  430. $(".required").each(function() {
  431. if(!$.trim($(this).val())) {
  432. empty_flds++;
  433. $(this).addClass('error');
  434. }
  435. else if($(this).val() == 'Yes')
  436. {
  437. var nexttextarea = $(this).parent().next().find('textarea');
  438. if (!$(nexttextarea).val()) {
  439. nexttextarea.addClass('error');
  440. empty_flds++;
  441. }
  442.  
  443. }
  444. });
  445. console.log(empty_flds);
  446. if (empty_flds) {
  447. $('form').prepend('<p class="error">Please complete all required fields</p>');
  448. window.scrollTo(0,0);
  449. e.preventDefault();
  450. } else {
  451.  
  452. }
  453. });
  454. });
  455. </script>
  456. <script src="assets/json2.min.js"></script>
  457. </body>
  458. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement