vishwamano

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

commit db3d5213d45b85e5c1f41031b1e0c7bb5bd69cfc
parent f5c447b4eb9bcb7d822c153f9ff14de1dbba5689
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Thu,  1 Jan 2015 18:02:05 -0500

First version of upgraded contact/ page ready (uses Smarty).

	renamed:    contact/index.html -> contact/index.html.backup
	new file:   contact/index.php
	new file:   themes/bs3/templates/contact.tpl

Diffstat:
contact/index.html | 121-------------------------------------------------------------------------------
contact/index.html.backup | 121+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
contact/index.php | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/bs3/templates/contact.tpl | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 247 insertions(+), 121 deletions(-)

diff --git a/contact/index.html b/contact/index.html @@ -1,121 +0,0 @@ -<!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> Contact &middot; 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 pull-right"> - <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 me an email. - </p> - <p> - <span class="label label-info"> - <i class="icon-envelope icon-white"></i> - Email - </span> - <code> vishwa91photography at gmail dot com </code> - </p> - - <br /> - - <p> - Follow Me On Facebook: <a href="http://facebook.com/vishwaphotography">*Galleria De Vishwa*</a>. - </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="/contact/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"> - <i class="icon-arrow-right icon-white"></i> - 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> - Copyright &copy; 2013 - <a href="http://vishwamano.com/" property="cc:attributionName" - rel="cc:attributionURL"> - Vishwa Manoharan. - </a> - <a 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.png" /> - </a> - </p> - <ul class="footer-links"> - <li class="muted"> &middot; </li> - <li> <a href="/colophon/"> Colophon </a> </li> - <li class="muted"> &middot; </li> - </ul> - </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/index.html.backup b/contact/index.html.backup @@ -0,0 +1,121 @@ +<!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> Contact &middot; 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 pull-right"> + <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 me an email. + </p> + <p> + <span class="label label-info"> + <i class="icon-envelope icon-white"></i> + Email + </span> + <code> vishwa91photography at gmail dot com </code> + </p> + + <br /> + + <p> + Follow Me On Facebook: <a href="http://facebook.com/vishwaphotography">*Galleria De Vishwa*</a>. + </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="/contact/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"> + <i class="icon-arrow-right icon-white"></i> + 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> + Copyright &copy; 2013 + <a href="http://vishwamano.com/" property="cc:attributionName" + rel="cc:attributionURL"> + Vishwa Manoharan. + </a> + <a 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.png" /> + </a> + </p> + <ul class="footer-links"> + <li class="muted"> &middot; </li> + <li> <a href="/colophon/"> Colophon </a> </li> + <li class="muted"> &middot; </li> + </ul> + </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/index.php b/contact/index.php @@ -0,0 +1,52 @@ +<?php + +/* Vishwamano.com PHP snafu. + + Copyright (C) 2014 rsiddharth <rsiddharth@ninthfloor.org> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + COPYING contains the full text of the GNU Affero General Public + License. If you have not recieved a copy of the file along with + this program, see <http://www.gnu.org/licenses/>. + +*/ + + +require_once('../templating.php'); +require_once($abs_path . '/utils.php'); + +if(isset($_POST['submit'])) { + $msg = send_message($lemail); + $smarty->assign('c_msg', $msg); +} + +$title = 'Contact &middot; Vishwa Manoharan Photograhy'; +$meta_desc = ''; + +$p_title = "Contact"; + +$contact = array('Email' => array('vishwa91photography at gmail dot com', + 'mailto:vishwa91photography@gmail.com'), + 'Facebook' => array('Galleria De Vishwa', + 'https://www.facebook.com/vishwaphotography'), + 'Flickr' => array('@vishwamano', + '#'), + 'NG Your Shot' => array(' National Geographic Profile', + 'https://members.nationalgeographic.com/904810501949/') + ); + +$smarty->assign('p_title', $p_title); +$smarty->assign('contact', $contact); +$smarty->assign('title', $title); +$smarty->assign('meta_description', $meta_desc); +$smarty->display('contact.tpl'); + diff --git a/themes/bs3/templates/contact.tpl b/themes/bs3/templates/contact.tpl @@ -0,0 +1,74 @@ +{include file='header.tpl'} + + +<div class="container-fluid"> <!-- top container start --> + + + <div class="row"> <!-- contact row start --> + + <div class="col-sm-offset-2 col-sm-6"> <!-- contact column start --> + + {if isset($c_msg)} + <div id="c-alert-box" class="alert alert-{$c_msg.type}" role="alert"> + <p>{$c_msg.content}</p> + </div> + {/if} + + <h1>{$p_title}</h1> + + <ul class="list-unstyled"> + {foreach $contact as $kind => $content} + <li> + {$kind}: <a href="{$content[1]}">{$content[0]}</a> + </li> + {/foreach} + </ul> + + <h2>Ping a message</h2> + + + <form id="vmcontact-form" method="POST" role="form" action="/contact/"> + <div class="form-group"> + <label for="name" class="control-label">Name:</label> + <input type="text" name="name" class="form-control" id="name"> + </div> + <div class="form-group"> + <label for="email" class="control-label">Email:</label> + <input type="text" name="email" class="form-control" id="email" required> + </div> + + <div class="form-group"> + <label for="message" class="control-label">Message:</label> + <textarea name="message" class="form-control" id="message" + rows="4" required></textarea> + </div> + + <div class="form-group"> + <label for="humantest" class="control-label">What is 98 + 2?:</label> + <input type="number" name="humantest" class="form-control" id="humantest" required> + </div> + + <button id="vmcontact-submit" type="submit" name="submit" + value="submit" form="vmcontact-form" class="btn + btn-primary">Send message</button> + + </form> + + + </div> <!-- contact column end --> + + </div> <!-- contact row end --> +</div> <!-- top container end --> + +{include file='js.tpl'} +<script> + $('#nav-link-contact').addClass("active"); +</script> +<script> + setTimeout(function(){ + if ($('#c-alert-box').length > 0) { + $('#c-alert-box').fadeOut('slow'); + } + }, 20000) +</script> +{include file='footer.tpl'}