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
| body{ | |
| font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; | |
| font-weight: 300; | |
| } |
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 Page{ | |
| public $name; | |
| public $params; | |
| public $title; | |
| public $content; | |
| public function __construct($name,$params = array()){ | |
| $this->name = $name; |
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
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <meta name="viewport" content="width=device-width,initial-scale=1.0"> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> | |
| <meta name="mobile-web-app-capable" content="yes"> |
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
| var image = new Image(); | |
| image.onload = function() { | |
| var canvas = document.createElement('canvas'); | |
| canvas.width = image.width; | |
| canvas.height = image.height; | |
| var context = canvas.getContext('2d'); | |
| context.drawImage(image, 0, 0); | |
| var imageData = context.getImageData(0, 0, canvas.width, canvas.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 | |
| // db config | |
| if(!defined('DB_SERVER')){ define('DB_SERVER','localhost'); } | |
| if(!defined('DB_NAME')){ define('DB_NAME','db_name'); } | |
| if(!defined('DB_USERNAME')){ define('DB_USERNAME','root'); } | |
| if(!defined('DB_PASSWORD')){ define('DB_PASSWORD',''); } | |
| if(!defined('DB_PREFIX')){ define('DB_PREFIX',''); } | |
| class DB | |
| { |
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 setSelectionRange(input, selectionStart, selectionEnd) { | |
| if (input.setSelectionRange) { | |
| input.focus(); | |
| input.setSelectionRange(selectionStart, selectionEnd); | |
| } | |
| else if (input.createTextRange) { | |
| var range = input.createTextRange(); | |
| range.collapse(true); | |
| range.moveEnd('character', selectionEnd); | |
| range.moveStart('character', selectionStart); |
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 ($, undefined) { | |
| $.fn.getCursorPosition = function() { | |
| var el = $(this).get(0); | |
| var pos = 0; | |
| if('selectionStart' in el) { | |
| pos = el.selectionStart; | |
| } else if('selection' in document) { | |
| el.focus(); | |
| var Sel = document.selection.createRange(); | |
| var SelLength = document.selection.createRange().text.length; |
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
| $.fn.extend({ | |
| insertAtCaret: function(myValue) { | |
| var obj; | |
| if( typeof this[0].name !='undefined' ) obj = this[0]; | |
| else obj = this; | |
| if ($.browser.msie) { | |
| obj.focus(); | |
| sel = document.selection.createRange(); | |
| sel.text = myValue; | |
| obj.focus(); |
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 Password | |
| { | |
| const ALPHANUMERIC = 0; | |
| const NUMBERS_ONLY = 1; | |
| const ALPHABETIC_ONLY = 2; | |
| private $password; | |
| private $salt; | |
| private $hash; |
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 Calendar { | |
| static $now = 0; | |
| function __construct() { | |
| Calendar::$now = time(); | |
| } | |
| function years($start, $end) { |