This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="arbitrary-modal" class="reveal-modal medium"> | |
<div class="modal-content"></div> | |
<a class="close-reveal-modal">×</a> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
// Support for AJAX loaded modal window. | |
// Focuses on first input textbox after it loads the window. | |
$('[data-toggle="modal"]').click(function(e) { | |
e.preventDefault(); | |
var url = $(this).attr('href'); | |
if (url.indexOf('#') == 0) { | |
$(url).modal('open'); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="sarea"> | |
<form id="searchform" action="<php echo home_url( '/' ); >" method="get" role="search"> | |
<input id="s" type="text" name="s" value="" placeholder="Search Here & Hit Enter"> | |
</form> | |
</div> | |
<a href="#" id="sbutton"> Search </a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!--[if IE 8]><html class="no-js lt-ie9" lang="en"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="content-language" content="en" /> | |
<meta name="description" content="__description__" /> | |
<meta name="keywords" content="__keywords__" /> | |
<meta name="author" content="Jackabox" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if(isset($_POST['cf_submit'])) { | |
$errors = array(); | |
$success = null; | |
$required_fields['cf_name'] = 'You are required to enter your Name.'; | |
$required_fields['cf_email'] = 'You are required to enter your E-mail Address.'; | |
$required_fields['cf_subject'] = 'You are required to enter a Subject.'; | |
$required_fields['cf_message'] = 'You are required to enter a Message.'; | |
foreach($_POST as $key => $value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body | |
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif | |
font-weight: 300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.modal | |
display: none | |
width: 600px | |
background: #fff | |
padding: 15px 30px | |
border-radius: 8px | |
box-shadow: 0 0 10px #000 | |
margin-right: -300px | |
right: 50% | |
a.close-modal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rules = array( | |
'image' => 'image|mimes:jpg,jpeg,png|max:3000', | |
); | |
$validation = Validator::make($input, $rules); | |
if ($validation->fails()) { | |
return Response::make($validation->errors->first(), 400); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//date in mm/dd/yyyy format; or it can be in other formats as well | |
$birthDate = '11/05/1992'; | |
//explode the date to get month, day and year | |
$birthDate = explode("/", $birthDate); | |
//get age from date or birthdate | |
$age = (date("md", date("U", mktime(0, 0, 0, $birthDate[0], $birthDate[1], $birthDate[2]))) > date("md") ? ((date("Y")-$birthDate[2])-1):(date("Y")-$birthDate[2])); | |
OlderNewer