This file contains hidden or 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
function ajaxJSON(json){ | |
if(json){ | |
var obj = (typeof(json) == 'object') ? json : eval('(' + json + ')'); | |
eval(obj.script); | |
if(obj.confirm){ | |
obj.success = confirm(obj.confirm); | |
} | |
return obj; | |
} | |
return {}; |
This file contains hidden or 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 | |
$data = array( | |
'name' => $_POST['name'], | |
'email' => $_POST['email'], | |
'comment' => $_POST['comment'] | |
); | |
$add_comment = new mySQL(); | |
$new_comment_id = $add_comment->insert('comments', $data); |
This file contains hidden or 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 | |
/* | |
JPEG / GIF / PNG Resizer / Image Viewer | |
Parameters (passed via URL): | |
src = path / url of jpeg or png image file | |
percent = if this is defined, image is resized by it's | |
value in percent (i.e. 50 to divide by 50 percent) | |
w = image width | |
h = image height |
This file contains hidden or 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 | |
$filename = $my_file_name; | |
if(substr($filename,0,1) != "/"){ | |
$filename = "/". $filename; | |
} | |
if(ini_get('zlib.output_compression')) | |
ini_set('zlib.output_compression', 'Off'); | |
$file_extension = strtolower(substr(strrchr($filename,"."),1)); |
This file contains hidden or 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 | |
<select name="state" id="state"> | |
<option value=""<?php if(!isset($_POST['state']) || $_POST['state'] == ""){ ?> selected="selected"<?php } ?>>Select One</option> | |
<option value="AL"<?php if($_POST['state'] == "AL"){ ?> selected="selected"<?php } ?>>Alabama</option> | |
<option value="AK"<?php if($_POST['state'] == "AK"){ ?> selected="selected"<?php } ?>>Alaska</option> | |
<option value="AZ"<?php if($_POST['state'] == "AZ"){ ?> selected="selected"<?php } ?>>Arizona</option> | |
<option value="AR"<?php if($_POST['state'] == "AR"){ ?> selected="selected"<?php } ?>>Arkansas</option> | |
<option value="CA"<?php if($_POST['state'] == "CA"){ ?> selected="selected"<?php } ?>>California</option> | |
<option value="CO"<?php if($_POST['state'] == "CO"){ ?> selected="selected"<?php } ?>>Colorado</option> | |
<option value="CT"<?php if($_POST['state'] == "CT"){ ?> selected="selected"<?php } ?>>Connecticut</option> |
This file contains hidden or 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 | |
function validEmail($email_address){ | |
// First, we check that there's one @ symbol, and that the lengths are right | |
if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email_address)) { | |
// Email invalid because wrong number of characters in one section, or wrong number of @ symbols. | |
return false; | |
} | |
// Split it into sections to make life easier | |
$email_array = explode("@", $email_address); | |
$local_array = explode(".", $email_array[0]); |
This file contains hidden or 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
ORDER BY CASE | |
WHEN `col` = ‘item’ THEN 1 | |
WHEN `col` = ‘thing’ THEN 2 | |
WHEN `col` = ‘stuff’ THEN 3 | |
WHEN `col` = ‘boom’ THEN 4 | |
ELSE 5 | |
END |
This file contains hidden or 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
margin-bottom: 12px; | |
font: normal 1.1em "Lucida Sans Unicode", serif; | |
background: url(img/quote.gif) no-repeat; | |
padding-left: 28px; | |
color: #555; |
This file contains hidden or 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
jQuery(function($){ | |
$('.gform_fields input[type="text"], .gform_fields input[type="email"], .gform_fields input[type="tel"], .gform_fields textarea').fadeLabel(); | |
}); |
This file contains hidden or 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
(function($) { | |
var waveDragDrop = { | |
init: function(){ | |
this.setupInvoiceDragDrop(); | |
this.setupEstimateDragDrop(); | |
}, | |
setupInvoiceDragDrop: function(){ |