vishwamano

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

commit 2a6979286c5ceb4d2906dc1ce5ffefb0a02fea93
parent 96f201cd1c32fc5dfbafeafe6e71841274eb326c
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Sat,  6 Feb 2016 17:25:44 -0500

utils.php: updated request_shoot function.

Diffstat:
utils.php | 42+++++++++++-------------------------------
1 file changed, 11 insertions(+), 31 deletions(-)

diff --git a/utils.php b/utils.php @@ -94,28 +94,21 @@ soon. Should you have a query, kindly call/WhatsApp <strong>+91-9176560151</stro function request_shoot($email, $other_email) { $to = $email; $other_to = $other_email; - $name = $_POST['name']; + $name = $_POST['name']; $email_address = $_POST['email']; - $phone = $_POST['phone']; - $shoot_t = $_POST['shoot_type']; - $shoot_date = $_POST['shoot_date']; - $other_details = $_POST['other_details']; - $humantest = $_POST['humantest']; - $submit = $_POST['submit']; + $phone = $_POST['phone']; + $shoot_t = $_POST['stype']; + $humantest = $_POST['humantest']; - $humantest_answer= "99"; + $humantest_answer = "101"; if((strcmp($humantest, $humantest_answer)== 0) and (!empty($name) and !empty($email_address))) { - $email_subject = "[VishaMano.com] A&S Shoot Request from $name"; + $email_subject = "[VishaMano.com] Shoot Request from $name"; - $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"; - } + $email_body = "$name <$email_address> has requested for a shoot. \n\n" + . "Type of shoot: $shoot_t"; if(!empty($phone)) { $email_body .= "\n\n$name can be buzzed at $phone"; @@ -127,24 +120,11 @@ function request_shoot($email, $other_email) { mail($to, $email_subject, $email_body, $headers); mail($other_to, $email_subject, $email_body, $headers); - $alert_msg = 'You have successfully requested for <strong>' - . $shoot_t . '</strong> on <strong>' - . $shoot_date. '</strong>. <strong>Vishwa Manoharan</strong> will get back to you -soon. Should you have a query, kindly call/WhatsApp -<strong>+91-9176560151</strong>.'; - $alert = array( 'type' => 'success', - 'content' => $alert_msg); + return 'success'; + }else { + return 'error'; } - else { - $alert_msg = '<strong> Shoot Request unsuccessful</strong>. Please try again.' - . ' If problem persists email <strong>Vishwa Manoharan' - . ' &lt;vishwa91photography@gmail.com&gt;</strong>.'; - $alert = array( 'type' => 'danger', - 'content' => $alert_msg); - } - - return $alert; }