diff options
author | Jos Poortvliet <jospoortvliet@gmail.com> | 2019-05-09 17:51:58 +0300 |
---|---|---|
committer | Jos Poortvliet <jospoortvliet@gmail.com> | 2019-05-09 17:51:58 +0300 |
commit | 74cfda4fe75d3e15e93e26747e9bfb93a651c6fd (patch) | |
tree | 4b63c66654b6c8add35f47e3a695500926bf20c6 /page-includesubmit.php | |
parent | 1d71f30374e4b563787d005c3497c719415e742a (diff) |
making it look a bit better
Signed-off-by: Jos Poortvliet <jospoortvliet@gmail.com>
Diffstat (limited to 'page-includesubmit.php')
-rw-r--r-- | page-includesubmit.php | 81 |
1 files changed, 47 insertions, 34 deletions
diff --git a/page-includesubmit.php b/page-includesubmit.php index 347f0875..e9575aa2 100644 --- a/page-includesubmit.php +++ b/page-includesubmit.php @@ -1,13 +1,22 @@ -<section class="enterprise-hero-section second-menu"> - <div class="container-fluid background"> - <div class="container"> +<head> +<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/assets/css/pages/include.css"> + +<meta itemprop="image" content="<?php bloginfo('template_directory'); ?>/assets/img/features/include.png"> +<meta name="twitter:image" content="<?php bloginfo('template_directory'); ?>/assets/img/features/include.png"> +<meta name="twitter:image:src" content="<?php bloginfo('template_directory'); ?>/assets/img/features/include.png"> +<meta property="og:image" content="<?php bloginfo('template_directory'); ?>/assets/img/features/include.png"> +</head> + +<div class="background include-background"> + <div class="container"> + <div class="row"> <div class="col-md-6 topheader"> - <h1><?php echo $l->t('Get support from the source');?></h1> - <h2><?php echo $l->t('The best expertise whenever you need it!');?></h2> + <h1><?php echo $l->t('Nextcloud Include');?></h1> + <h2><code><?php echo $l->t('Supporting diversity in open source');?></code></h2> </div> </div> </div> -</section> +</div> <?php if(isset($_POST['email'])) { @@ -16,7 +25,7 @@ if(isset($_POST['email'])) { ?> <section class="section--whitepaper"> <div class="container text-center"> - <h3>Sorry, there was an error with the form you submitted</h3> + <h3>Sorry, there was an error with the form you submitted. Please try to fill in all fields correctly!</h3> <p>The error(s) detected:<br/> <?php echo $error . "<br />"; @@ -36,20 +45,20 @@ if(isset($_POST['email'])) { !isset($_POST['location']) || !isset($_POST['languages']) || !isset($_POST['os']) || - !isset($_POST['contribute']) || - !isset($_POST['links']) || + !isset($_POST['contribute']) || + !isset($_POST['links']) || !isset($_POST['others'])) { died('We are sorry, but there appears to be a problem with the form you submitted - did you fill in all fields?'); } $yourname = $_POST['yourname']; // required $email_from = $_POST['email']; // required - $organization= $_POST['who']; // required - $phone = $_POST['fit']; // required - $users = $_POST['location']; // required - $comments = $_POST['languages']; // required - $comments = $_POST['os']; // required - $comments = $_POST['contribute']; // required - $comments = $_POST['links']; - $comments = $_POST['others']; + $who= $_POST['who']; // required + $fit = $_POST['fit']; // required + $location = $_POST['location']; // required + $languages = $_POST['languages']; // required + $os = $_POST['os']; // required + $contribute = $_POST['contribute']; // required + $links = $_POST['links']; // required + $others = $_POST['others']; // required $checksum = $_POST['checksum']; // required $captcha = $_POST['captcha']; $error_message = ""; @@ -71,26 +80,29 @@ if(isset($_POST['email'])) { } } $string_exp = "/^((\+|00)\d{1,3})?(\d+|\s+)+\d$/"; - if(strlen($error_message) > 0) { - died($error_message); - } else { - function clean_string($string) { - $bad = array("content-type", "bcc:", "to:", "cc:", "href"); - return str_replace($bad, "", $string); - } - $email_message = "New message from Include.\n\n"; + + if(strlen($error_message) > 0) { + died($error_message); + } else { + function clean_string($string) { + $bad = array("content-type", "bcc:", "to:", "cc:", "href"); + return str_replace($bad, "", $string); + } + +// create mail message $email_to = "include@nextcloud.com"; $email_subject = "New message from Include: ".clean_string($yourname); + $email_message = clean_string($yourname)." entered in the Include form:\n\n"; $email_message .= "Name: ".clean_string($yourname)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; - $email_message .= "Introduction: ".clean_string($who)."\n"; - $email_message .= "Fit for Include? ".clean_string($fit)."\n"; - $email_message .= "Location: ".clean_string($location)."\n"; - $email_message .= "Languages: ".clean_string($language)."\n"; - $email_message .= "OS: ".clean_string($os)."\n"; - $email_message .= "Possible contributions: ".clean_string($contribute)."\n"; - $email_message .= "Links: ".clean_string($links)."\n"; - $email_message .= "Additional comments ".clean_string($others)."\n"; + $email_message .= "Their location: ".clean_string($location)."\n"; + $email_message .= "The languages they speak: ".clean_string($languages)."\n"; + $email_message .= "The OS they have experience with: ".clean_string($os)."\n"; + $email_message .= "Links to blogs, social media, github account and more: ".clean_string($links)."\n"; + $email_message .= "Introduction: "."\n> ".clean_string($who)."\n"; + $email_message .= "Why they think they are fit for Include: "."\n> ".clean_string($fit)."\n"; + $email_message .= "What they think they can contribute: "."\n> ".clean_string($contribute)."\n"; + $email_message .= "Additional comments they had: "."\n> ".clean_string($others)."\n"; // create email headers $headers = 'From: no-reply@nextcloud.com'."\r\n". 'Reply-To: '.$email_from."\r\n" . @@ -104,7 +116,8 @@ if(isset($_POST['email'])) { 'headers' => $headers, ]; file_put_contents('/var/log/sales-leads.txt', json_encode($data) . PHP_EOL, FILE_APPEND | LOCK_EX); -// Send the email to the list + +// Send the email to $email_to @mail($email_to, $email_subject, $email_message, $headers); ?> |