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 | |
// I use here Jeff's db methods | |
public function getTree($registry, $parent=0) { | |
$child_rows = $registry->db->autoSelect("id", TABLE, "parent='$parent'", "name"); | |
$children = array(); |
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
// requires mootools-core bind function | |
function FCKeditor_OnComplete(editorInstance){ | |
editorInstance.EditorDocument.addEventListener('keypress', checkCharacters.bind(editorInstance)); | |
} | |
function checkCharacters(e) { |
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 | |
define('SESSION_TIMEOUT', '1800'); // 30 minutes | |
session_name('fuckIE'); | |
session_start(); | |
// ...bla bla | |
if (isset($_SESSION['last_activity']) && (time() - $_SESSION['last_activity'] > SESSION_TIMEOUT)) { |
NewerOlder