vishwamano

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

commit 2c8123e461e57294304b667f47ffcd7974f9c88a
parent 87c4be16cb69319f8bd1f8cd15e1b5bce5d46834
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Wed, 31 Dec 2014 01:08:54 -0500

very rough version of Photography Classes is done.

	new file:   as/photography-classes/index.php
	new file:   themes/bs3/templates/p-classes.tpl

Diffstat:
as/photography-classes/index.php | 122+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/bs3/templates/p-classes.tpl | 133+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 255 insertions(+), 0 deletions(-)

diff --git a/as/photography-classes/index.php b/as/photography-classes/index.php @@ -0,0 +1,122 @@ +<?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 = register($lemail); + $smarty->assign('pc_msg', $msg); +} + + +$title = 'Photography Classes &middot; A&amp;S &middot; Vishwa Manoharan Photograhy'; +$meta_desc = 'Basic and Advanced photography course offered in Chennai for +beginners by Vishwa Manoharan.'; + +$pc_title = "Photography Classes"; +$pc_intro = " +<p> '<strong>Apertures and Shutters</strong>' is my start up, offering + <strong>Basic and Advanced Weekend Photography Classes</strong>in + Chennai. With extensive theory, guided outdoor and review sessions, a + complete enlightenment in photography is assured. I strongly believe + that Photography is an Art, not merely technical settings and hence + the classes will be taught in a practical and dynamic manner.</p> + +<p> Apertures &amp; Shutters is equipped with a Classroom cum Studio +Floor with lighting equipment and a dedicated Editing Room. Stocked +with the latest photography journals and books, A&amp;S provides a +congenial atmosphere to learn photography. The process of learning +never ends and students enjoy continued online support and reviews +post completion of the course.</p> +"; + +$classes = array(); + +$level_1 = array('Duration' => array('calendar', + '4 Weekends. Post completion of course, continued support through + periodical online reviews and photo-walks.'), + 'Time' => array('time','Saturday 5pm &rArr; 7pm <br/> + Sunday 10am &rArr; 12pm'), + 'Venue' => array('map-marker', 'Choolaimedu, Chennai'), + 'Course Fee' => array('tag', '<span class="WebRupee"> + Rs + </span> + 3500'), + 'Eligibility' => array('tasks', 'A never ending thirst for photography. <br /> + Possession of a camera is a must, preferably a DSLR.'), + 'Syllabus' => array('book', ' <ul> + <li>The \'Art Of Seeing\' The World Around You</li> + <li>What To Shoot? Why To Shoot? </li> + <li>Knowing Your Camera </li> + <li>Types Of Lenses And Their Uses </li> + <li>The Exposure Triangle - Aperture, Shutter and ISO</li> + <li>Shooting Modes, Metering Modes, Autofocus Types, White Balance, etc </li> + <li>Exposure Compensation </li> + <li>How To Create A Photograph</li> + <li>Golden Rules Of Composition</li> + <li>Understanding Light</li> + <li>Filters And Their Uses</li> + <li>How To Click Beautiful Landscape And Nature Pictures</li> + <li>How To Click People</li> + <li>How To Take Creative Photographs</li> + <li>Photographing The Night And Other Long Exposure Techniques</li> + <li>Basic Photoshop Correction</li> + </ul>'), + ); + +$classes['Level 1 - Basic Photography Course '] = $level_1; + + +$level_2 = array('Duration' => array('calendar', '8 Weekends'), + 'Venue' => array('map-marker', 'Choolaimedu, Chennai'), + 'Course Fee' => array('tag', '<span class="WebRupee"> + Rs + </span> + 7000'), + 'Eligibility' => array('tasks', '<strong>Level 1</strong> completion in A&amp;S or + any equivalent course. <br /> Possession of a + DSLR is a must.'), + 'Syllabus' => array('book', '<ul> + <li> Lighting Foundation + <li> Types of Lighting </li> + <li> Lighting for Still Life - Strobist Session </li> + <li> Portrait and Fashion - Studio Session </li> + <li> Portrait - Strobist Session </li> + <li> Light Mixing </li> + <li> Macro Photography in Depth </li> + <li> HDR, Panoramas, Time Lapses, etc. </li> + <li> Shooting in RAW </li> + <li> All relevant Post Processing </li></ul>') + ); + +$classes['Level 2 - Advanced Photography Course'] = $level_2; + +$smarty->assign('pc_title', $pc_title); +$smarty->assign('pc_intro', $pc_intro); +$smarty->assign('classes', $classes); +$smarty->assign('title', $title); +$smarty->assign('meta_description', $meta_desc); +$smarty->display('p-classes.tpl'); + diff --git a/themes/bs3/templates/p-classes.tpl b/themes/bs3/templates/p-classes.tpl @@ -0,0 +1,133 @@ +{include file='header.tpl'} + +<!-- reg. modal section start --> +<div class="modal fade" id="vmreg-modal" tabindex="-1" role="dialog" aria-labelledby="vmreg-modal-label" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> + <h3 class="modal-title" id="vmreg-modal-label">Registration</h3> + </div> + <div class="modal-body"> + <form id="vmreg-form" method="POST" role="form" action="/as/photography-classes/index.php"> + <div class="form-group"> + <label for="name" class="control-label">Name:</label> + <input type="text" name="name" class="form-control" id="name" required> + </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="phone" class="control-label">Phone Number:</label> + <input type="tel" name="phone" class="form-control" id="phone"> + </div> + + <div class="form-group"> + <label for="blurb" class="control-label">Tell us about yourself:</label> + <textarea name="blurb" class="form-control" id="blurb" rows="3"></textarea> + </div> + + <div class="form-group"> + <label for="humantest" class="control-label">What is 100 + 1:</label> + <input type="number" name="humantest" class="form-control" id="humantest"> + </div> + </form> + </div> + <div class="modal-footer"> + <button id="vmreg-submit" type="submit" name="submit" value="submit" + form="vmreg-form" class="btn btn-primary">Register</button> + </div> + </div> + </div> + </div> + +<!-- reg. modal end --> + +<div class="container-fluid"> <!-- top container start --> + + {if isset($pc_msg)} + <div id="pc-alert-box" class="row"> + <div class="col-sm-offset-2 col-sm-9"> + <div class="alert alert-{$pc_msg.type}" role="alert"> + <button type="button" class="close" data-dismiss="alert"> + <span aria-hidden="true">&times;</span> + <span class="sr-only">Close</span> + </button> + <p>{$pc_msg.content}</p> + </div> + </div> + </div> + {/if} + <div class="row"> <!-- top row start --> + <div class="col-sm-6"> <!-- pc column start --> + <h1 class="text-center">{$pc_title}</h1> + {$pc_intro} + + <div id="pc-section"> <!-- pc info section start --> + + {foreach $classes as $c_name => $c_info} + <h2>{$c_name}</h2> + + <button type="button" class="btn btn-primary btn-xs" data-toggle="collapse" + data-target="#pc-{$c_info@index}" data-parent="#pc-section" + aria-expanded="false" aria-controls="pc-{$c_info@index}"> + See course details. + </button> + + <div id="pc-{$c_info@index}" class="collapse"> <!-- pc level {$c_info@iteration} info start --> + <dl> + {foreach $c_info as $field_name => $field_value} + <dt> + <span class="label label-inverse"> + <span class="glyphicon glyphicon-{$field_value[0]}"></span> + {$field_name} + </span> + </dt> + <dd> + {$field_value[1]} + </dd> + {/foreach} + </dl> + </div> <!-- pc level {$c_info@iteration} info end --> + <button type="button" + class="btn btn-primary" + data-toggle="modal" + data-target="#vmreg-modal" data-pclasstype="{$c_name}" + data-pclasslevel="{$c_info@iteration}"> + Register + </button> + {/foreach} + + </div> <!-- pc info section end --> + + </div> <!-- pc column end --> + + </div> <!-- top row end --> +</div> <!-- top container end --> + +{include file='js.tpl'} +<script> + $('#nav-link-pc').addClass("active"); +</script> +<script> + $('#vmreg-modal').on('show.bs.modal', function (event) { + var button = $(event.relatedTarget) // Button that triggered the modal + var class_type = button.data('pclasstype') // Extract info from data-* attributes + var class_level = button.data('pclasslevel') + // If necessary, you could initiate an AJAX request here (and then do the updating in a callback). + // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead. + var modal = $(this) + modal.find('.modal-title').text(class_type + ' Registration') + modal.find('#vmreg-submit').val(class_level) + }) +</script> +<script> + setTimeout(function(){ + if ($('#pc-alert-box').length > 0) { + $('#pc-alert-box').fadeOut('slow'); + } + }, 20000) +</script> + +{include file='footer.tpl'}