FUNCTION include_from($dir, $ext='php'){
$opened_dir = OPENDIR($dir);
WHILE ($element=READDIR($opened_dir)){
$fext=SUBSTR($element,STRLEN($ext)*-1);
IF(($element!='.') && ($element!='..') && ($fext==$ext)){
INCLUDE($dir.$element);
}
}
CLOSEDIR($opened_dir);
}