Skip to content
Snippets Groups Projects
Commit b98f0959 authored by Michael Fairchild's avatar Michael Fairchild
Browse files

Moved the to, from, and subject vars for email to the config file. Fixed...

Moved the to, from, and subject vars for email to the config file.  Fixed phone number validation issue.  Made the type field required. 
parent 516c2378
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,9 @@ function myautoload($class)
require_once $file;
}
spl_autoload_register('myautoload');
$sendToEmail = "desertstorm365@gmail.com"; //Will send form data to this email address.
$sendFromEmail = "test@test.com"; //Will send email from this address.
$emailSubject = "Ribbon Cutting Proposal"; //Subject for the email
spl_autoload_register('myautoload');
require_once '../../../lib/php/UNL/WDN/Emailer/Main.php';
......@@ -9,7 +9,9 @@ function myautoload($class)
require_once $file;
}
spl_autoload_register('myautoload');
$sendToEmail = ""; //Will send form data to this email address.
$sendFromEmail = ""; //Will send email from this address.
$emailSubject = "Ribbon Cutting Proposal"; //Subject for the email.
spl_autoload_register('myautoload');
require_once '../../../lib/php/UNL/WDN/Emailer/Main.php';
<?php
//TODO: Make page two collums, add graphic of iPad and the new building.
/**
* TODO: Make page two collums, add graphic of iPad and the new building.
**/
require_once dirname(__FILE__).'/../../../config.inc.php';
if (!empty($_POST)) {
$mailer = new UNL_WDN_Emailer_Main();
......@@ -12,9 +14,9 @@ if (!empty($_POST)) {
$body .= "<b>Proposal:</b><br/>" . $_POST['proposal'] . "<br/>";
$mailer->html_body = $body;
$mailer->to_address = 'desertstorm365@gmail.com';
$mailer->from_address = 'test@test.com';
$mailer->subject = 'Ribbon Cutting Proposal';
$mailer->to_address = $sendToEmail;
$mailer->from_address = $sendFromEmail;
$mailer->subject = $emailSubject;
if (!empty($_GET['submit'])) {
$mailer->send();
header('Location: thankyou.php');
......@@ -39,8 +41,6 @@ if (!empty($_POST)) {
-->
<link rel="stylesheet" type="text/css" media="screen" href="/wdn/templates_3.0/css/all.css" />
<link rel="stylesheet" type="text/css" media="print" href="/wdn/templates_3.0/css/print.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/physics.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/jquery.ketchup.css" />
<script type="text/javascript" src="/wdn/templates_3.0/scripts/all.js"></script>
<script type="text/javascript" src="/wdn/templates_3.0/scripts/jquery/validator/jquery.validator.js"></script>
......@@ -166,16 +166,16 @@ if (!empty($_POST)) {
<ol>
<li><label for="name" class="element"><span class="required">*</span>Name<span class="helper">Enter Your Full Name</span></label><div class="element"><input id="name" name="name" type="text" class="required-entry" /></div></li>
<li><label for="email" class="element"><span class="required">*</span>Email Address</label><div class="element"><input id="email" name="email" type="text" class="required-entry validate-email" /></div></li>
<li><label for="phone" class="element"><span class="required">*</span>Phone Number<span class="helper">Format: 402-555-1234</span></label><div class="element"><input id="phone" name="phone" type="text" class="required-entry validate-phone" /></div></li>
<li><label for="video" class="element">Youtube URL<span class="helper">Highly recommended.</span></label><div class="element"><input id="video" name="video" type="text" /></div></li>
<li><label for="phone" class="element"><span class="required">*</span>Phone Number<span class="helper">Format: 402-555-1234</span></label><div class="element"><input id="phone" name="phone" type="text" class="required-entry validate-phoneLax" /></div></li>
<li><label for="video" class="element">Youtube URL<span class="helper">Highly recommended.</span></label><div class="element"><input id="video" name="video" type="text" class="validate-url"/></div></li>
<li>
<fieldset><legend>You are a</legend>
<fieldset><legend><span class="required">*</span>You are a</legend>
<ol>
<li><input name="type" value="UNL student" type="radio" id="unlstudent" /><label for="unlstudent">UNL student</label></li>
<li><input name="type" value="High school student" type="radio" id="hsstudent" /><label for="hsstudent">High school student</label></li>
<li><input name="type" value="UNL faculty" type="radio" id="faculty" /><label for="faculty">UNL faculty</label></li>
<li><input name="type" value="UNL Alum" type="radio" id="alum" /><label for="alum">UNL Alum</label></li>
<li><input name="type" value="Other" type="radio" id="other" /><label for="other">Other</label></li>
<li><input name="type" value="UNL student" type="radio" id="unlstudent" class="validate-one-required-by-name"/><label for="unlstudent">UNL student</label></li>
<li><input name="type" value="High school student" type="radio" id="hsstudent" class="validate-one-required-by-name"/><label for="hsstudent">High school student</label></li>
<li><input name="type" value="UNL faculty" type="radio" id="faculty" class="validate-one-required-by-name"/><label for="faculty">UNL faculty</label></li>
<li><input name="type" value="UNL Alum" type="radio" id="alum" class="validate-one-required-by-name"/><label for="alum">UNL Alum</label></li>
<li><input name="type" value="Other" type="radio" id="other" class="validate-one-required-by-name"/><label for="other">Other</label></li>
</ol>
</fieldset>
</li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment