read()) { if(strpos($file, '.php') !== FALSE) { parse_file($dirname .'/'. $file); } else { if($file != '.' && $file != '..' && $file != '.svn' && $file != 'pear' && is_dir($dirname .'/'. $file)) { parse_dir($dirname .'/'. $file); } } } } // parse any todo's out of a file function parse_file($filename) { $contents = file_get_contents($filename); preg_match_all("~(TODO:\{(.+?)\})~i", $contents, $matches); parse_todos($matches); unset($contents); } // parse the info out of the matches from the parsing of a file function parse_todos($matches) { for($i = 0; $i < count($matches[2]); $i++) { if(!empty($matches[2][$i])) { $list = explode('[', $matches[2][$i]); $html = "\t\t\n"; $html .= "\t\t\t". htmlentities(ucfirst(@$list[1]), ENT_QUOTES) ."\n"; $html .= "\t\t\t
 ". @$list[2] ." 
\n"; $html .= "\t\t\t
 ". @$list[3] ." 
\n"; $html .= "\t\t\n"; echo $html; } } //print_r($matches); } // get our todo's.. echo "

Todo's In OneLobby's PHP Files

\n"; echo "

Format: TODO:{[comment[function[class}

\n"; echo "\n"; echo "\t\n"; echo "\t\t\n"; echo "\t\n"; echo "\t\n"; parse_dir(START_DIR); echo "\t\n"; echo "
CommentFunctionClass
"; ?>