Added contact form

Uses AYAH integration in PICKLES
This commit is contained in:
Josh Sherman 2013-12-23 19:14:39 -05:00
parent c4461007c7
commit 5bab800948
8 changed files with 105 additions and 2 deletions

View file

@ -94,6 +94,12 @@ $config = array(
'name' => 'LeaderBin',
'domain' => 'leaderbin.com',
),
'api' => array(
'ayah' => array(
'publisher_key' => '12605450c23a1a6cff00b387ffe673dd9d2a27fe',
'scoring_key' => '79b499385530453f43026ec58347564bbc08b8c2',
),
),
);
?>

8
modules/contact.php Normal file
View file

@ -0,0 +1,8 @@
<?php
class contact extends CustomModule
{
}
?>

26
modules/contact/send.php Normal file
View file

@ -0,0 +1,26 @@
<?php
class contact_send extends contact
{
public function __default()
{
if (API_AYAH::isHuman())
{
// Sends the message
mail('support@gravityblvd.com', '[LeaderBin] ' . $_POST['subject'], $_POST['email'] . "\n\n" . $_POST['message']);
Browser::redirect('/contact?success');
}
else
{
?>
<h1>Our system has determined that you may not be a human being.</h1>
<p>If you happen to be Lil Wayne please <a href="/contact">contact us</a> as wed love to hear about how youre using our service.</p>
<p>If you are not Lil Wayne, please <a href="/contact">go back</a> and try the challenge game again.</p>
<iframe width="560" height="315" src="//www.youtube.com/embed/daRhEOkUL1o" frameborder="0" allowfullscreen></iframe>
<?php
exit;
}
}
}
?>

View file

@ -0,0 +1,8 @@
<?php
class legal_privacy extends CustomModule
{
}
?>

8
modules/legal/terms.php Normal file
View file

@ -0,0 +1,8 @@
<?php
class legal_terms extends CustomModule
{
}
?>

View file

@ -0,0 +1,47 @@
<form role="form" class="row col-xs-12 col-sm-6 col-sm-offset-3" method="post" action="/contact/send">
<?php
if (isset($_GET['success']))
{
?>
<br><div class="alert alert-success">Your message has been sent!</div>
<?php
}
?>
<h1>Get in touch</h1>
<?php
echo $this->html->div(
array('class' => 'form-group'),
$this->html->inputEmail(array(
'label' => 'Email Address',
'name' => 'email',
'class' => 'form-control input-lg email required',
))
);
echo $this->html->div(
array('class' => 'form-group'),
$this->html->input(array(
'label' => 'Subject',
'name' => 'subject',
'class' => 'form-control input-lg required',
'minlength' => 10,
))
);
echo $this->html->div(
array('class' => 'form-group'),
$this->html->textarea(array(
'label' => 'Message',
'name' => 'message',
'class' => 'form-control input-lg required',
'minlength' => 10,
'placeholder' => 'Bonus points for keeping it under 140 character.',
'rows' => 5,
))
);
echo API_AYAH::getHTML() . '<br>';
?>
<button type="submit" class="btn btn-success btn-lg">Send Message</button>
</form>

View file

@ -1,6 +1,6 @@
<h1><?php echo $this->config->site['name']; ?> Privacy Policy</h1>
<p class="alert warning"><strong>Updated:</strong> December 23<sup>rd</sup>, 2013</p>
<p class="alert alert-info"><strong>Updated:</strong> December 23<sup>rd</sup>, 2013</p>
<h2>Your Data</h2>
<p>We take privacy seriously and respect the privacy of our users and the privacy of their data. The following discloses our information gathering and dissemination practices of this website. Although we own the data storage, databases and the Site itself, <strong>you retain all rights to your data</strong>.</p>

View file

@ -1,6 +1,6 @@
<h1>Terms of Service</h1>
<p class="alert warning"><strong>Updated:</strong> December 23<sup>rd</sup>, 2013</p>
<p class="alert alert-info"><strong>Updated:</strong> December 23<sup>rd</sup>, 2013</p>
<h2>Welcome to <?php echo $__config->site['name']; ?></h2>
<p>By using or accessing <?php echo $__config->site['domain']; ?>, including any sub domains of <?php echo $__config->site['domain']; ?> (collectively, the &ldquo;Site&rdquo;), you agree to the following terms and conditions (&ldquo;Terms of Service&rdquo;).</p>