Advertisement
jmanf47

Member Registration

Aug 14th, 2017
436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.12 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4. require_once('php/simple-php-captcha/simple-php-captcha.php');
  5. require_once('php/php-mailer/PHPMailerAutoload.php');
  6.  
  7. // Step 1 - Enter your email address below.
  8. $email = 'jane.manfield@corporatesonline.com';
  9.  
  10. // If the e-mail is not working, change the debug option to 2 | $debug = 2;
  11. $debug = 2;
  12.  
  13. if(isset($_POST['emailSent'])) {
  14.  
  15. $subject .= $field['text']."SAL Member Registration ";
  16.  
  17. // Step 2 - If you don't want a "captcha" verification, remove that IF.
  18. if (strtolower($_POST['captcha']) == strtolower($_SESSION['captcha']['code'])) {
  19.  
  20. // Step 3 - Configure the fields list that you want to receive on the email.
  21. $fields = array(
  22. 0 => array(
  23. 'text' => 'Name',
  24. 'val' => $_POST['name']
  25. ),
  26. 1 => array(
  27. 'text' => 'Email address',
  28. 'val' => $_POST['email']
  29. ),
  30.  
  31. 2 => array(
  32. 'text' => 'Type of Membership',
  33. 'val' => implode($_POST['checkboxes'], ", ")
  34. ),
  35.  
  36. );
  37.  
  38. $message = '';
  39.  
  40. foreach($fields as $field) {
  41. $message .= $field['text'].": " . htmlspecialchars($field['val'], ENT_QUOTES) . "<br>\n";
  42. }
  43.  
  44. $mail = new PHPMailer(true);
  45.  
  46. try {
  47.  
  48. $mail->SMTPDebug = $debug; // Debug Mode
  49.  
  50. // Step 3 (Optional) - If you don't receive the email, try to configure the parameters below:
  51.  
  52. //$mail->IsSMTP(); // Set mailer to use SMTP
  53. //$mail->Host = 'mail.yourserver.com'; // Specify main and backup server
  54. //$mail->SMTPAuth = true; // Enable SMTP authentication
  55. //$mail->Username = 'user@example.com'; // SMTP username
  56. //$mail->Password = 'secret'; // SMTP password
  57. //$mail->SMTPSecure = 'tls'; // Enable encryption, 'ssl' also accepted
  58. //$mail->Port = 587; // TCP port to connect to
  59.  
  60. $mail->AddAddress($email); // Add a recipient
  61.  
  62. //$mail->AddAddress('person2@domain.com', 'Person 2'); // Add another recipient
  63. //$mail->AddCC('person3@domain.com', 'Person 3'); // Add a "Cc" address.
  64. //$mail->AddBCC('person4@domain.com', 'Person 4'); // Add a "Bcc" address.
  65.  
  66. $mail->SetFrom($email, $_POST['name']);
  67. $mail->AddReplyTo($_POST['email'], $_POST['name']);
  68.  
  69. $mail->IsHTML(true); // Set email format to HTML
  70.  
  71. $mail->CharSet = 'UTF-8';
  72.  
  73. $mail->Subject = $subject;
  74. $mail->Body = $message;
  75.  
  76. // Step 4 - If you don't want to attach any files, remove that code below
  77. if (isset($_FILES['attachment']) && $_FILES['attachment']['error'] == UPLOAD_ERR_OK) {
  78. $mail->AddAttachment($_FILES['attachment']['tmp_name'], $_FILES['attachment']['name']);
  79. }
  80.  
  81. $mail->Send();
  82.  
  83. $arrResult = array ('response'=>'success');
  84.  
  85. } catch (phpmailerException $e) {
  86. $arrResult = array ('response'=>'error','errorMessage'=>$e->errorMessage());
  87. } catch (Exception $e) {
  88. $arrResult = array ('response'=>'error','errorMessage'=>$e->getMessage());
  89. }
  90.  
  91. } else {
  92.  
  93. $arrResult = array ('response'=>'captchaError');
  94.  
  95. }
  96.  
  97. }
  98. ?>
  99. <!DOCTYPE html>
  100. <html>
  101. <head>
  102.  
  103. <!-- Basic -->
  104. <meta charset="utf-8">
  105. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  106.  
  107. <title>application for Membership of The Sugar Association of London </title>
  108.  
  109. <meta name="keywords" content="Refined Sugar Association Membership, RSA Membership, Refined Sugar Association Registration, RSA Member Registration" />
  110. <meta name="description" content="Membership Registration for The Refined Sugar Association">
  111. <meta name="author" content="Corporates Online">
  112.  
  113. <!-- Favicon -->
  114. <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
  115. <link rel="apple-touch-icon" href="img/apple-touch-icon.png">
  116.  
  117. <!-- Mobile Metas -->
  118. <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  119.  
  120. <!-- Web Fonts -->
  121. <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800%7CShadows+Into+Light" rel="stylesheet" type="text/css">
  122.  
  123. <!-- Vendor CSS -->
  124. <link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css">
  125. <link rel="stylesheet" href="vendor/font-awesome/css/font-awesome.min.css">
  126. <link rel="stylesheet" href="vendor/animate/animate.min.css">
  127. <link rel="stylesheet" href="vendor/simple-line-icons/css/simple-line-icons.min.css">
  128. <link rel="stylesheet" href="vendor/owl.carousel/assets/owl.carousel.min.css">
  129. <link rel="stylesheet" href="vendor/owl.carousel/assets/owl.theme.default.min.css">
  130. <link rel="stylesheet" href="vendor/magnific-popup/magnific-popup.min.css">
  131.  
  132. <!-- Theme CSS -->
  133. <link rel="stylesheet" href="css/theme.css">
  134. <link rel="stylesheet" href="css/theme-elements.css">
  135. <link rel="stylesheet" href="css/theme-blog.css">
  136. <link rel="stylesheet" href="css/theme-shop.css">
  137.  
  138. <!-- Current Page CSS -->
  139. <link rel="stylesheet" href="vendor/rs-plugin/css/settings.css">
  140. <link rel="stylesheet" href="vendor/rs-plugin/css/layers.css">
  141. <link rel="stylesheet" href="vendor/rs-plugin/css/navigation.css">
  142.  
  143. <!-- Skin CSS -->
  144. <link rel="stylesheet" href="css/skins/custom-skin.css">
  145.  
  146. <!-- Theme Custom CSS -->
  147. <link rel="stylesheet" href="css/custom-sal.css">
  148.  
  149. <!-- Head Libs -->
  150. <script src="vendor/modernizr/modernizr.min.js"></script>
  151.  
  152. </head>
  153. <body>
  154.  
  155. <div class="body">
  156. <header id="header" class="header-no-border-bottom" data-plugin-options="{'stickyEnabled': true, 'stickyEnableOnBoxed': true, 'stickyEnableOnMobile': false, 'stickyStartAt': 148, 'stickySetTop': '-148px', 'stickyChangeLogo': false}">
  157. <div class="header-body">
  158. <div class="header-top header-top-style-2">
  159. <div class="container">
  160.  
  161. <p class="pull-right">
  162. <i class="fa fa-map-marker"></i> The Sugar Association of London &amp; The Refined Sugar Association, 154 Bishopsgate, London EC2M 4LN | <i class="fa fa-phone"></i> +44 (0) 20 7377 2113 </p>
  163. </p>
  164. </div>
  165. </div>
  166. <div class="header-container container">
  167. <div class="header-row">
  168. <div class="header-column">
  169. <div class="header-logo pull-left">
  170. <a href="sal.php">
  171. <img alt="Sugar Association of London" width="220" height="80" data-sticky-width="110" data-sticky-height="40" data-sticky-top="33" src="img/SAL_RGB_80.gif"></a>&nbsp;
  172. <a href="documents/SAL effective 1st May 2017 Complete.pdf" target="_blank"> <button type="button" class="btn btn-3d btn-primary mr-xs mb-sm">SAL Rules 2017</button></a>
  173.  
  174.  
  175.  
  176. </div>
  177. <div class="header-logo pull-right">
  178. <a href="documents/RSA Effective 1st July 2017 Complete.pdf" target="_blank"> <button type="button" class="btn btn-3d btn-secondary mr-xs mb-sm">RSA Rules 2017</button></a>&nbsp;
  179. <a href="rsa.php">
  180. <img alt="Refined Sugar Association of London" width="220" height="80" data-sticky-width="110" data-sticky-height="40" data-sticky-top="33" src="img/RSA_RGB_80.gif"></a>
  181.  
  182.  
  183.  
  184.  
  185. </div>
  186. </div>
  187.  
  188. </div>
  189. </div>
  190. <div class="header-container header-nav header-nav-bar header-nav-bar-primary">
  191. <div class="container">
  192. <button class="btn header-btn-collapse-nav" data-toggle="collapse" data-target=".header-nav-main">
  193. <i class="fa fa-bars"></i>
  194. </button>
  195. <div class="header-nav-main header-nav-main-light header-nav-main-effect-1 header-nav-main-sub-effect-1 collapse">
  196. <nav>
  197. <ul class="nav nav-pills" id="mainNav">
  198. <li class="dropdown">
  199. <a class="dropdown-toggle" href="index.php">
  200. Home
  201. </a>
  202. <ul class="dropdown-menu">
  203. <li>
  204. <a href="sal.php">
  205. Sugar Association of London
  206. </a>
  207. </li>
  208. <li>
  209. <a href="rsa.php">
  210. Refined Sugar Association
  211. </a>
  212. </li>
  213.  
  214. </ul>
  215. </li>
  216. <li class="dropdown">
  217. <a class="dropdown-toggle" href="#">
  218. Rules
  219. </a>
  220. <ul class="dropdown-menu">
  221. <li>
  222. <a href="sal-rules.php">
  223. Rules - Sugar Association of London
  224. </a>
  225. </li>
  226. <li>
  227. <a href="rsa-rules.php">
  228. Rules - Refined Sugar Association
  229. </a>
  230. </li>
  231.  
  232. </ul>
  233. </li>
  234.  
  235. <li class="dropdown">
  236. <a class="dropdown-toggle" href="#">
  237. Application for Membership
  238. </a>
  239. <ul class="dropdown-menu">
  240. <li>
  241. <a href="sal-member-registration.php">
  242. Register - Sugar Association of London
  243. </a>
  244. </li>
  245. <li>
  246. <a href="rsa-member-registration.php">
  247. Register - Refined Sugar Association
  248. </a>
  249. </li>
  250.  
  251. </ul>
  252. </li>
  253. <li class="dropdown">
  254. <a class="dropdown-toggle" href="#">
  255. Events
  256. </a>
  257. <ul class="dropdown-menu">
  258. <li>
  259. <a href="events.php#forthcoming">
  260. Forthcoming Events
  261. </a>
  262. </li>
  263. <li>
  264. <a href="events.php#past">
  265. Past Events
  266. </a>
  267. </li>
  268. <li>
  269. <a href="events.php#gallery">
  270. Gallery
  271. </a>
  272. </li>
  273.  
  274. </ul>
  275. </li>
  276. <li>
  277. <a href="contact.php">
  278. Contact
  279. </a>
  280. </li>
  281.  
  282. </ul>
  283. </nav>
  284. </div>
  285. </div>
  286. </div>
  287. </div>
  288. </header>
  289.  
  290. <div role="main" class="main">
  291.  
  292. <section class="page-header">
  293. <div class="container">
  294. <div class="row">
  295. <div class="col-md-12">
  296. <ul class="breadcrumb">
  297. <li><a href="#">Home</a></li>
  298. <li class="active">Application for Membership</li>
  299. </ul>
  300. </div>
  301. </div>
  302. <div class="row">
  303. <div class="col-md-12">
  304. <h1>Application for Membership</h1>
  305. </div>
  306. </div>
  307. </div>
  308. </section>
  309.  
  310.  
  311.  
  312. <div class="container">
  313. <img src="img/sal-pages-400.jpg" width="1170" height="400" alt="Sugar Association of London Member Registration" />
  314. <p>&nbsp;</p>
  315.  
  316. <div class="row">
  317. <div class="col-md-9">
  318.  
  319.  
  320.  
  321. <div class="offset-anchor" id="contact-sent"></div>
  322.  
  323.  
  324. <h2 class="mb-sm mt-sm">Application for <strong>Membership</strong></h2>
  325. <p>&ldquo;To apply for Full or Affiliate membership please download and complete the Application form. All Applications must be supported by two existing Full Members who must complete the Proposer and Seconder forms. The completed Application, Proposer and Seconder forms should be sent to the Secretary along with your last audited Accounts.&rdquo;</p>
  326. <p>The Application, Proposer and Seconder forms can be reached by the link below.</p>
  327.  
  328. <div class="row">
  329. <div class="col-md-12">
  330. <p><a href="documents/SAL Full Membership Application Forms.pdf" target="_blank"><strong>SAL Full Member Application Form</strong></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="documents/SAL Affilliate Membershop Application forms.pdf" target="_blank"><strong>SAL Affiliate Member Application Form</strong></a></p>
  331. </div>
  332. </div>
  333.  
  334. <form id="contactFormAdvanced" action="sal-member-registration.php#contact-sent" method="POST" enctype="multipart/form-data">
  335. <input type="hidden" value="true" name="emailSent" id="emailSent">
  336. <div class="row">
  337. <div class="form-group">
  338. <div class="col-md-4">
  339. <label>Your name *</label>
  340. <input type="text" value="" data-msg-required="Please enter your name." maxlength="100" class="form-control" name="name" id="name" required>
  341. </div>
  342. <div class="col-md-4">
  343. <label>Your email address *</label>
  344. <input type="email" value="" data-msg-required="Please enter your email address." data-msg-email="Please enter a valid email address." maxlength="100" class="form-control" name="email" id="email" required>
  345. </div>
  346. </div>
  347. </div>
  348.  
  349. <div class="row">
  350. <div class="form-group">
  351. <div class="col-md-12">
  352. <label>Membership</label>
  353.  
  354. <div class="checkbox-group" data-msg-required="Please select at least one option.">
  355. <label class="checkbox-inline">
  356. <input type="checkbox" name="checkboxes[]" id="full" value="FULL"> Full
  357. </label>
  358. <label class="checkbox-inline">
  359. <input type="checkbox" name="checkboxes[]" id="affiliate" value="AFFILIATE"> Affiliate
  360. </label>
  361.  
  362. </div>
  363. </div>
  364. </div>
  365.  
  366. </div>
  367.  
  368. <div class="row">
  369. <div class="form-group">
  370. <div class="col-md-4">
  371. <label>Resgistration Form *</label>
  372. <input type="file" name="attachment" id="attachment">
  373. </div>
  374.  
  375.  
  376.  
  377. <div class="form-group">
  378. <div class="col-md-4">
  379. <label>Company Accounts *</label>
  380. <input type="file" name="attachment" id="attachment">
  381. </div>
  382. </div>
  383. </div>
  384. <div class="row">
  385. <div class="col-md-6">
  386. <label>Human Verification *</label>
  387. </div>
  388. </div>
  389. <div class="row">
  390. <div class="form-group">
  391. <div class="col-md-4">
  392. <div class="captcha form-control">
  393. <div class="captcha-image">
  394. <img id="captcha-image" src="php/simple-php-captcha/simple-php-captcha.php//development/sugarassociation_rebrand/php/simple-php-captcha/simple-php-captcha.php?_CAPTCHA&amp;t=0.79959800+1502726686" alt="CAPTCHA code"> </div>
  395. <div class="captcha-refresh">
  396. <a href="#" id="refreshCaptcha"><i class="fa fa-refresh"></i></a>
  397. </div>
  398. </div>
  399. </div>
  400. <div class="col-md-4">
  401. <input type="text" value="" maxlength="6" data-msg-captcha="Wrong verification code." data-msg-required="Please enter the verification code." placeholder="Type the verification code." class="form-control input-lg captcha-input" name="captcha" id="captcha" required>
  402. </div>
  403. </div>
  404. </div>
  405. <div class="row">
  406. <div class="col-md-12">
  407. <hr>
  408. </div>
  409. </div>
  410. <div class="row">
  411. <div class="col-md-12">
  412. <input type="submit" id="contactFormSubmit" value="Send Application" class="btn btn-primary btn-lg " data-loading-text="Loading...">
  413. </div>
  414. </div>
  415. </form>
  416. </div>
  417. </div>
  418. <div class="col-md-3">
  419. <aside class="sidebar">
  420.  
  421. <h4 class="heading-primary">SAL</h4>
  422. <ul class="nav nav-list mb-xlg">
  423. <li><a href="index.php">Home</a></li>
  424. <li><a href="sal.php">SAL Introduction</a></li>
  425. <li>
  426. <a href="sal-rules.php">Rules</a>
  427. <ul>
  428. <li><a href="sal-rules.php#current">Current</a></li>
  429. <li><a href="sal-rules.php#previous">Previous</a></li>
  430.  
  431. </ul>
  432. </li>
  433. <li class="active"><a href="sal-member-registration.php">Application for Membership</a></li>
  434. <li><a href="events.php">Events</a>
  435. <ul>
  436. <li><a href="events.php#forthcoming">Forthcoming</a></li>
  437. <li><a href="events.php#past">Past</a></li>
  438. <li><a href="events.php#gallery">Gallery</a></li>
  439.  
  440. </ul>
  441. </li>
  442.  
  443.  
  444. <li><a href="contact.php">Contact</a></li>
  445.  
  446. </ul>
  447. </aside>
  448. </div>
  449. </div>
  450.  
  451. </div>
  452.  
  453. <footer id="footer" class="light">
  454. <div class="container">
  455. <div class="row">
  456.  
  457. <div class="col-md-3"><img src="img/SAL_RGB_80.gif" width="220" height="80" alt="Sugar Association of London"></div>
  458.  
  459. <div class="col-md-6">
  460. <div class="contact-details">
  461. <h4>Contact Us</h4>
  462. <ul class="contact">
  463. <li><p><i class="fa fa-map-marker"></i> <strong>Address:</strong> The Sugar Association of London, 154 Bishopsgate, London EC2M 4LN</p></li>
  464.  
  465. <li><p><i class="fa fa-phone"></i> <strong>Phone:</strong>+44 (0) 20 7377 2113</p></li>
  466.  
  467.  
  468.  
  469. <li><p><i class="fa fa-envelope"></i> <strong>Email:</strong> <a href="mailto:durhamn@sugar-assoc.co.uk">durhamn@sugar-assoc.co.uk</a></p></li>
  470. </ul>
  471. </div>
  472. </div>
  473. <div class="col-md-3">
  474. <img src="img/RSA_RGB_80.gif" width="220" height="80" alt="Refined Sugar Association">
  475. </div>
  476. </div>
  477. </div>
  478. <div class="footer-copyright">
  479. <div class="container">
  480. <div class="row">
  481.  
  482. <div class="col-md-6">
  483. <p>© The Sugar Association of London Copyright 2017. All Rights Reserved.</p>
  484. </div>
  485. <div class="col-md-4">
  486. <p>Website design by <a href="http://www.corporatesonline.com">Corporates Online</a></p>
  487. </div>
  488. <div class="col-md-2">
  489. <nav id="sub-menu">
  490. <ul>
  491.  
  492. <li><a href="#">Sitemap</a></li>
  493. <li><a href="#">Contact</a></li>
  494. </ul>
  495. </nav>
  496. </div>
  497. </div>
  498. </div>
  499. </div>
  500. </footer>
  501. </div>
  502.  
  503. <!-- Vendor -->
  504. <!--[if lt IE 9]>
  505. <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
  506. <![endif]-->
  507.  
  508.  
  509. <script src="vendor/jquery/jquery.min.js"></script>
  510. <script src="vendor/jquery.appear/jquery.appear.min.js"></script>
  511. <script src="vendor/jquery.easing/jquery.easing.min.js"></script>
  512. <script src="vendor/jquery-cookie/jquery-cookie.min.js"></script>
  513. <script src="vendor/bootstrap/js/bootstrap.min.js"></script>
  514. <script src="vendor/common/common.min.js"></script>
  515. <script src="vendor/jquery.validation/jquery.validation.min.js"></script>
  516. <script src="vendor/jquery.easy-pie-chart/jquery.easy-pie-chart.min.js"></script>
  517. <script src="vendor/jquery.gmap/jquery.gmap.min.js"></script>
  518. <script src="vendor/jquery.lazyload/jquery.lazyload.min.js"></script>
  519. <script src="vendor/isotope/jquery.isotope.min.js"></script>
  520. <script src="vendor/owl.carousel/owl.carousel.min.js"></script>
  521. <script src="vendor/magnific-popup/jquery.magnific-popup.min.js"></script>
  522. <script src="vendor/vide/vide.min.js"></script>
  523.  
  524. <!-- Theme Base, Components and Settings -->
  525. <script src="js/theme.js"></script>
  526.  
  527. <!-- Specific Page Vendor and Views -->
  528. <script src="js/views/view.contact.js"></script>
  529.  
  530. <!-- Theme Custom -->
  531. <script src="js/custom.js"></script>
  532.  
  533. <!-- Theme Initialization Files -->
  534. <script src="js/theme.init.js"></script>
  535.  
  536.  
  537. <!-- Google Analytics: Change UA-XXXXX-X to be your site's ID. Go to http://www.google.com/analytics/ for more information.
  538. <script type="text/javascript">
  539.  
  540. var _gaq = _gaq || [];
  541. _gaq.push(['_setAccount', 'UA-12345678-1']);
  542. _gaq.push(['_trackPageview']);
  543.  
  544. (function() {
  545. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  546. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  547. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  548. })();
  549.  
  550. </script>
  551. -->
  552.  
  553. </body>
  554. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement