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
/** | |
* Class Name | |
* | |
* @author <Christopher A. Moore> [email protected], [email protected] | |
* @package V2 | Valuationvision | |
* @usage | |
* | |
*/ |
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 detect_city($ip) { | |
$default = 'Hollywood, CA'; | |
if (!is_string($ip) || strlen($ip) < 1 || $ip == '127.0.0.1' || $ip == 'localhost') | |
$ip = '8.8.8.8'; | |
$curlopt_useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)'; | |
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
public function updateOrder($data = array()) | |
{ | |
$sql = 'UPDATE `user` SET '; | |
foreach ($data as $key => $value) { | |
if(is_numeric($value)){ | |
$sql .= "`$key` = $value,"; | |
}else{ | |
$sql .= "`$key` = '$value',"; | |
} | |
} |
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 | |
$array = array( | |
'within' => 0, | |
'near' => 0, | |
'exceed' => | |
); | |
foreach($data as $key => $value) | |
{ | |
$r = businessHours(strtotime($value->ordereddate))/3600; | |
$diff = $r - $value->standard_sla; |
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
require_once 'swift_required.php'; | |
// Mailer Config | |
$transport = Swift_MailTransport::newInstance(); | |
// Message Setup | |
$message = Swift_Message::newInstance() | |
->setSubject('You now have access to Dropbox') | |
->setFrom(array('[email protected]' => 'Valuation Vision')) | |
->setTo(array($client_data->email => $client_data->firstname.' '.$client_data->lastname)) |
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 | |
/** | |
* Dropbox helper Methods | |
* | |
* @author <Christopher A. Moore> [email protected], [email protected] | |
* @package Dropbox API Extension | |
*/ | |
class DropboxUtility | |
{ |
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 format_phone($phone) | |
{ | |
$phone = preg_replace("/[^0-9]/", "", $phone); | |
if(strlen($phone) == 7) | |
return preg_replace("/([0-9]{3})([0-9]{4})/", "$1-$2", $phone); | |
elseif(strlen($phone) == 10) | |
return preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "($1) $2-$3", $phone); | |
else | |
return $phone; |
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
#!/usr/bin/php | |
<?php | |
// Pear Lib | |
require_once "XML/Unserializer.php"; | |
$options = array( | |
'complexType' => 'object', | |
'encoding' => 'utf-8', | |
'parseAttributes' => TRUE, | |
'returnResult' => TRUE |
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
input{ | |
border-radius: 5px; | |
box-shadow:inset 0 1px 3px #8dcfff; | |
background: #fff; | |
} |
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 mask(str, textbox, loc, delim) { | |
var locs = loc.split(','); | |
for (var i = 0; i <= locs.length; i++) { | |
for (var k = 0; k <= str.length; k++) { | |
if (k == locs[i]) { | |
if (str.substring(k, k + 1) != delim) { | |
str = str.substring(0, k) + delim + str.substring(k, str.length) | |
} | |
} |
NewerOlder