vishwamano

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

commit 41ab21789e8a4ef64774506b93908a1d0303ba87
parent 0f479a0a964eaa62904115dc1387a3ebdf727f87
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Tue, 18 Jun 2013 17:07:35 +0530

new section contacts/ added.

index.html files at as/ bio/ gallery & / were updated.

Diffstat:
as/index.html | 2+-
bio/index.html | 2+-
contact/index.html | 110+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
contact/mesg-error.html | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
contact/mesg-handler.php | 45+++++++++++++++++++++++++++++++++++++++++++++
contact/mesg-sent.html | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
gallery/index.html | 2+-
index.html | 2+-
8 files changed, 287 insertions(+), 4 deletions(-)

diff --git a/as/index.html b/as/index.html @@ -18,7 +18,7 @@ <li><a href="/gallery/"> Gallery </a></li> <li class="active"><a href="#"> Apertures & Shutters</a></li> <li><a href="/bio/"> Bio </a></li> - <li><a href="#"> Contact </a></li> + <li><a href="/contact/"> Contact </a></li> </ul> </div> </div> diff --git a/bio/index.html b/bio/index.html @@ -18,7 +18,7 @@ <li><a href="/gallery/"> Gallery </a></li> <li><a href="/as/">Apertures & Shutters</a></li> <li class="active"><a href="#"> Bio </a></li> - <li><a href="#">Contact</a></li> + <li><a href="/contact/">Contact</a></li> </ul> </div> </div> diff --git a/contact/index.html b/contact/index.html @@ -0,0 +1,110 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8" /> + <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/custom.css" rel="stylesheet" media="screen"> + <title> Vishwa Manoharan Photography </title> +</head> +<body> + <div class="container-fluid"> + <div class="navbar navbar-inverse"> + <div class="navbar-inner"> + <a class="brand" href="#">Vishwa Manoharan Photography</a> + <ul class="nav"> + <li><a href="/">Home</a></li> + <li><a href="/gallery/"> Gallery </a></li> + <li><a href="/as/"> Apertures & Shutters</a></li> + <li><a href="/bio/"> Bio </a></li> + <li class="active"><a href="/contact/"> Contact </a></li> + </ul> + </div> + </div> + </div> + + <div class="container-fluid"> <!-- Container Start --> + <div class="row-fluid"> + <div class="offset2 span7"> + <h2> Contact </h2> + <p> + For shoot-requests, please send an email. I'll get back to + you ASAP. + </p> + <p> + <span class="label label-info"><span class="icon-envelope icon-white"> + </span>Email</span>: vishwamano91 at gmail dot com + </p> + </div> + </div> + <div class="row-fluid"> <!-- Row Start --> + <div class="offset2 span5"> <!-- Message Space Start--> + <form class="form-horizontal" id="mesg-form" method="POST" action="mesg-handler.php"> + <fieldset> + <legend>Ping a Message</legend> + <div class="control-group"> + <label class="control-label" for="name">Name</label> + <div class="controls"> + <input type="text" id="name" name="name" placeholder="Spock" required> + </div> + </div> + + <div class="control-group"> + <label class="control-label" for="email">Email</label> + <div class="controls"> + <input type="email" id="email" name="email" placeholder="spock@cyb.org" required> + </div> + </div> + <div class="control-group"> + <label class="control-label" for="message"> Message </label> + <div class="controls"> + <textarea id="message" name="message" rows="10" + placeholder="Your Message Here." required></textarea> + </div> + </div> + + <div class="control-group"> + <label class="control-label" for="humantest"> What is 99 + 1 ?</label> + <div class="controls"> + <input type="text" id="humantest" name="humantest" placeholder="Prove that you're not a bot." required> + </div> + </div> + <div class="control-group"> + <div class="controls"> + <button type="submit" value="Submit" class="btn btn-inverse">Send Message</button> + </div> + </div> + </fieldset> + </form> + </div> <!-- Message Space End --> + </div> <!-- Row End --> + </div> <!-- Container End --> + + + + <footer class="footer"> + <div class="container-fluid"> + <p> + <a rel="license" + href="http://creativecommons.org/licenses/by-nc-nd/3.0/deed.en_US"><img alt="Creative + Commons License" style="border-width:0" src="/img/cc-nc-nd.png" + /></a><br />Vishwa Manoharan Photography + by <a href="http://vishwamano.com/" + property="cc:attributionName" + rel="cc:attributionURL">Vishwa Manoharan</a> is licensed + under a <a rel="license" + href="http://creativecommons.org/licenses/by-nc-nd/3.0/deed.en_US">Creative + Commons Attribution-NonCommercial-NoDerivs 3.0 Unported + License</a>.<br />Permissions beyond the scope of this + license may be available + at <a href="http://vishwamano.com/" + rel="cc:morePermissions">vishwamano.com</a>. + </p> + </div> + </footer> + <script src="/js/jquery-1.10.0.min.js"></script> + <script src="/js/bootstrap.min.js"></script> + <script src="/js/bootstrap-lightbox.min.js"></script> +</body> +</html> diff --git a/contact/mesg-error.html b/contact/mesg-error.html @@ -0,0 +1,67 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <title> Message Handler - Vishwa Manoharan Photography </title> + <meta charset="utf-8" /> + <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/custom.css" rel="stylesheet" media="screen"> +</head> +<body> + <div class="container-fluid"> + <div class="navbar navbar-inverse"> + <div class="navbar-inner"> + <a class="brand" href="#">Vishwa Manoharan Photography</a> + <ul class="nav"> + <li><a href="/">Home</a></li> + <li><a href="/gallery/"> Gallery </a></li> + <li><a href="/as/"> Apertures & Shutters</a></li> + <li><a href="/bio/"> Bio </a></li> + <li><a href="/contact/"> Contact </a></li> + </ul> + </div> + </div> + </div> + + <div class="container-fluid"> + <div class="row-fluid"> + <div class="offset3 span6"> + <div class="alert alert-error"> + <strong>Error!</strong> Message not Sent. You've either + failed the human test or you've not filled the fields + properly. + </div> + <p class="text-center"> + <a class="btn btn-inverse" href="/contact/"> Go Back </a> + </p> + </div> + + </div> + </div> + + <footer class="footer"> + <div class="container-fluid"> + <p> + <a rel="license" + href="http://creativecommons.org/licenses/by-nc-nd/3.0/deed.en_US"><img alt="Creative + Commons License" style="border-width:0" src="/img/cc-nc-nd.png" + /></a><br />Vishwa Manoharan Photography + by <a href="http://vishwamano.com/" + property="cc:attributionName" + rel="cc:attributionURL">Vishwa Manoharan</a> is licensed + under a <a rel="license" + href="http://creativecommons.org/licenses/by-nc-nd/3.0/deed.en_US">Creative + Commons Attribution-NonCommercial-NoDerivs 3.0 Unported + License</a>.<br />Permissions beyond the scope of this + license may be available + at <a href="http://vishwamano.com/" + rel="cc:morePermissions">vishwamano.com</a>. + </p> + </div> + </footer> + <script src="/js/jquery-1.10.0.min.js"></script> + <script src="/js/bootstrap.min.js"></script> + <script src="/js/bootstrap-lightbox.min.js"></script> +</body> +</html> diff --git a/contact/mesg-handler.php b/contact/mesg-handler.php @@ -0,0 +1,45 @@ +<?php + +/** + * + * Wrote with help from HTML Form Guide <http://www.html-form-guide.com/contact-form> + * + */ + +$myemail = 'vishwa91@gmail.com'; + +$name = $_POST['name']; +$email_address = $_POST['email']; +$message = $_POST['message']; +$humantest = $_POST['humantest']; + +$humantest_answer= "100"; + +if(strcmp($humantest, $humantest_answer)==0) +{ + if(empty($_POST['name']) || + empty($_POST['email']) || + empty($_POST['message'])) { + // redirect to the mesg-error page + header('Location: mesg-error.html'); + return; + } + $to = $myemail; + $email_subject = "[VishaMano.com] Message from $name"; + + $email_body = "$name <$email_address> has messaged you. \n\n". + "The Message:\n\n$message"; + //"\n\n$name 's email address is $email_address"; + + $headers = "From: no-reply@vishwamano.com\n"; + $headers .= "Reply-To: $email_address"; + + mail($to,$email_subject,$email_body,$headers); + //redirect to mesg-sent page + header('Location: mesg-sent.html'); +} +else { + // redirect to the mesg-error page + header('Location: mesg-error.html'); +} +?> diff --git a/contact/mesg-sent.html b/contact/mesg-sent.html @@ -0,0 +1,61 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8" /> + <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/custom.css" rel="stylesheet" media="screen"> + <title> Vishwa Manoharan Photography </title> +</head> +<body> + <div class="container-fluid"> + <div class="navbar navbar-inverse"> + <div class="navbar-inner"> + <a class="brand" href="#">Vishwa Manoharan Photography</a> + <ul class="nav"> + <li><a href="/">Home</a></li> + <li><a href="/gallery/"> Gallery </a></li> + <li><a href="/as/"> Apertures & Shutters</a></li> + <li><a href="/bio/"> Bio </a></li> + <li><a href="/contact/"> Contact </a></li> + </ul> + </div> + </div> + </div> + + <div class="container-fluid"> + <div class="row-fluid"> + <div class="offset3 span6"> + <div class="alert alert-success"> + <strong>Thank you!</strong> Your message has been sent to Vishwa Manoharan. + </div> + </div> + </div> + </div> + + <footer class="footer"> + <div class="container-fluid"> + <p> + <a rel="license" + href="http://creativecommons.org/licenses/by-nc-nd/3.0/deed.en_US"><img alt="Creative + Commons License" style="border-width:0" src="/img/cc-nc-nd.png" + /></a><br />Vishwa Manoharan Photography + by <a href="http://vishwamano.com/" + property="cc:attributionName" + rel="cc:attributionURL">Vishwa Manoharan</a> is licensed + under a <a rel="license" + href="http://creativecommons.org/licenses/by-nc-nd/3.0/deed.en_US">Creative + Commons Attribution-NonCommercial-NoDerivs 3.0 Unported + License</a>.<br />Permissions beyond the scope of this + license may be available + at <a href="http://vishwamano.com/" + rel="cc:morePermissions">vishwamano.com</a>. + </p> + </div> + </footer> + <script src="/js/jquery-1.10.0.min.js"></script> + <script src="/js/bootstrap.min.js"></script> + <script src="/js/bootstrap-lightbox.min.js"></script> +</body> +</html> diff --git a/gallery/index.html b/gallery/index.html @@ -18,7 +18,7 @@ <li class="active"><a href="#"> Gallery </a></li> <li><a href="/as/">Apertures & Shutters</a></li> <li><a href="/bio/"> Bio </a></li> - <li><a href="#">Contact</a></li> + <li><a href="/contact/">Contact</a></li> </ul> </div> </div> diff --git a/index.html b/index.html @@ -18,7 +18,7 @@ <li><a href="/gallery/"> Gallery </a></li> <li><a href="/as/"> Apertures & Shutters </a></li> <li><a href="/bio/"> Bio </a></li> - <li><a href="#">Contact</a></li> + <li><a href="/contact/">Contact</a></li> </ul> </div> </div>