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
/* Usage: | |
* Return element: elem("name-of-element"); | |
* Value of element: elem("name-of-element").val(); | |
* Any method in jQuery works here since it returns a jQuery object. | |
* */ | |
var elem = function(selector) | |
{ | |
return $("*[name="+ selector +"]"); | |
} |
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 | |
#! Photo resize controller. | |
#! Class interface. | |
interface iResize | |
{ | |
public function __construct($filename); | |
public function resize($x, $y); | |
public function save($locale); | |
} |
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 | |
/* #!modules/mysql.php | |
* Bike-This.com - Modules | |
* By Sam Jesso - [email protected] | |
* File: mysql.php | |
* Type: PHP | |
* Description: A MySQL (PHP 4 mysql_*) wrapper that makes queries visually easier to follow, execute, and debug. | |
*/ | |
class MySQL |
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 toCoordinates($address) | |
{ | |
$bad = array( | |
" " => "+", | |
"," => "", | |
"?" => "", | |
"&" => "", | |
"=" => "" | |
); |
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 | |
/* By Sam Jesso - [email protected] | |
* File: oceansql.php | |
* License: GNU GPL. | |
* Type: PHP | |
* Description: A MySQL (PHP 4 mysql_*) wrapper that makes queries visually easier to follow, execute, and debug. */ | |
defined("SYSTEM") or die("Access denied."); | |
class MySQL | |
{ |
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 str_time($stamp) | |
{ | |
$difference = time() - $stamp; | |
$intervals = array( | |
'minute' => 60, | |
'hour' => 3600, | |
'day' => 86400, | |
'month' => 2628000, | |
'year' => 31536000 |
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 | |
require '../engine.php'; | |
system::import('blog'); | |
if(http::get('article')) | |
{ | |
$article = blog::get_article(http::get('article')); | |
$article or page_not_found(); | |
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 | |
class mysql extends mysqli | |
{ | |
public static $servers = array(); | |
public static function ignite_server($name, $host, $username, $password, $db, $port = null, $socket = null) | |
{ | |
if(is_null($port)) | |
$port = ini_get('mysqli.default_port'); | |
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 | |
namespace Scarf\Views; | |
use Scarf\Models\Contacts; | |
use Scarf\Library\Layout\Templates; | |
/* Creates a URL at http://.../contacts */ | |
class Contacts | |
{ | |
/* The main page when /contacts is visited. */ |
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 | |
namespace Scarf\Views; | |
class Introduction | |
{ | |
public function main() | |
{ | |
write("Scarf is a modern, fast, maintainable, | |
easy-to-use rapid development PHP framework."); | |
} | |
} |