vishwamano

source of vishwamano.com
git clone git://git.ricketyspace.net/vishwamano.git
Log | Files | Refs

commit 3bd68f1179d086bb4c867779ea3b50f5c346bc2f
parent 0be083441fb73efc18744d1e2106facbb0ef1b9a
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Thu,  1 Aug 2013 16:37:57 +0530

added 'date' and 'other 'details' input boxes to the req-shoot form in as/

Diffstat:
as/index.html | 27+++++++++++++++++++++++++++
as/reqsht-handler.php | 15+++++++++++----
2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/as/index.html b/as/index.html @@ -5,6 +5,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="/css/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="/css/bootstrap-lightbox.min.css" rel="stylesheet" media="screen"> + <link href="/css/jui/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" media="screen"> <link href="/css/custom.css" rel="stylesheet" media="screen"> <title> A&amp;S &middot; Vishwa Manoharan Photography </title> </head> @@ -454,6 +455,26 @@ </label> </div> </div> + + <div class="control-group"> + <label class="control-label" for="shoot-date-rs"> + Date of Shoot + </label> + <div class="controls"> + <input type="text" id="shoot-date-rs" name="shoot_date" + placeholder="Format: MM/DD/YYYY" required> + </div> + </div> + + <div class="control-group"> + <label class="control-label" for="other-details"> + Anything else + </label> + <div class="controls"> + <textarea id="other-details" name="other_details" + placeholder="Specify other details you wish to add." ></textarea> + </div> + </div> <div class="control-group"> <label class="control-label" for="humantest-rs"> What is 98 + 1 ?</label> @@ -540,7 +561,13 @@ </div> </footer> <script src="/js/jquery-1.10.0.min.js"></script> + <script src="/js/jquery-ui-1.10.3.custom.min.js"></script> <script src="/js/bootstrap.min.js"></script> <script src="/js/bootstrap-lightbox.min.js"></script> + <script> + $(function() { + $( "#shoot-date-rs").datepicker(); + }); + </script> </body> </html> diff --git a/as/reqsht-handler.php b/as/reqsht-handler.php @@ -11,7 +11,9 @@ $myemail = 'vishwa91photography@gmail.com'; $name = $_POST['name']; $email_address = $_POST['email']; $phone = $_POST['phone']; -$shoot_t = $_POST['shoot_type']; +$shoot_t = $_POST['shoot_type']; +$shoot_date = $_POST['shoot_date']; +$other_details = $_POST['other_details']; $humantest = $_POST['humantest']; $submit = $_POST['submit']; @@ -21,7 +23,8 @@ if(strcmp($humantest, $humantest_answer)==0) { if(empty($name) || empty($email_address) || - empty($shoot_t)) { + empty($shoot_t) || + empty($shoot_date)){ // redirect to the mesg-error page header('Location: /as/req-error.html'); return; @@ -30,11 +33,15 @@ if(strcmp($humantest, $humantest_answer)==0) $to = $myemail; $email_subject = "[VishaMano.com] A&S Shoot Request from $name"; - $email_body = "$name <$email_address> has requested for A&S Photo Shoot. \n\n". + $email_body = "$name <$email_address> has requested for a A&S Photo Shoot on $shoot_date. \n\n". "Type of Shoot: $shoot_t"; + if(!empty($other_details)) { + $email_body .= "\n\nOther Details: $other_details"; + } + if(!empty($phone)) { - $email_body .= "\n\n $name can be buzzed at $phone"; + $email_body .= "\n\n$name can be buzzed at $phone"; } $headers = "From: no-reply@vishwamano.com\n";