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
CREATE TABLE IF NOT EXISTS geo_counties ( | |
id INT (11) NOT NULL, | |
slug VARCHAR (64) NOT NULL, | |
name VARCHAR (64) NOT NULL, | |
name_long VARCHAR (64) NOT NULL, | |
PRIMARY KEY(id) | |
) ENGINE = MyISAM; | |
CREATE TABLE IF NOT EXISTS geo_counties ( |
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
<route path="login"> | |
<controller>Authenticator</controller> | |
<request type="post" controllerCallback="validateLogin" /> | |
<request type="get" controllerCallback="showLoginForm" /> | |
<request type="ajax" controllerCallback="showJavaScriptModal" /> | |
</route> |
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
<route path="request"> | |
<controller>Request</controller> | |
<request type="get" callback="get" /> | |
<request type="post" callback="post" /> | |
<request type="put" callback="put" /> | |
<request type="delete" callback="delete" /> | |
<request type="get" callback="getAjax" ajax="true" /> |
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
<routes> | |
<defaultController>Default</defaultController> | |
<!-- A simple custom route --> | |
<route path="about-us"> | |
<controller callback="aboutUsPage">Company</controller> | |
</route> |
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 | |
ini_set('display_errors', 'On'); | |
error_reporting(E_ALL); | |
class InternalStore { | |
protected $store; | |
public function __construct($store = array()) { | |
$this->setStore($store); |
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 | |
// English | |
$arch->locale->setLocale('en-US'); | |
// Default english dict (en-US.xml) | |
echo $arch->lang->get('hello_world'); // Hello World | |
// Bork, english dict (en-US.xml) + translator module | |
$arch->locale->setTranslator('Enchefenizer'); | |
echo $arch->lang->get('hello_world'); // Hellu Vurld |
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
// I moustache you a question, but I'll shave it for later... | |
String.prototype.moustache = function(object, regex) { | |
return this.replace(regex || (/\\?\{\{([^{}]+)\}\}/g), function(match, key) { | |
if(match.charAt(0) == '\\') | |
return match.slice(1); | |
return (object[key] !== null) ? object[key] : ''; | |
}); | |
}; | |
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 | |
//ini_set('display_errors', 'On'); | |
//error_reporting(E_ALL); | |
class Stylesheet { | |
private $css_rule_regex = '/(?ims)([a-z0-9\s\.\:#_\-@]+)\{([^\}]*)\}/'; | |
public function __construct($css_data) { | |
$this->unparsed = $css_data; |
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 | |
class UploadrException extends Exception {} | |
class Uploadr { | |
public $upload_path; | |
protected $max_file_size; | |
public $max_file_count = 0; |
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
(function() { | |
var Lingo = this.Lingo = {}; | |
Lingo.Dictionary = function(dictionary) { | |
this.setDictionary(dictionary); | |
}; | |
OlderNewer