\n
".date('d-M-Y', $r['dateadded'])."
\n"; $news .= "

".$r['title']."

\n".str_replace("\n", "
\n", $r['message'])."\n\n"; } $files = DirList('music', '.ogg$|.mp4$|.m4a$'); if (isset($files)) sort($files); for ($a=0; $a\n"; $baseurl = 'http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']); $alternative_source = ''; $altfile = preg_replace('%.ogg$%i', '.mp3', $files[$a]); if (is_file($altfile)) { $alternative_source = ""; } $tracks .= "

".$title."

\n".$pic; $tracks .= "
\n"; $tracks .= $comment."

\n"; } // first is path, second is similar to eregi() in regular expression syntax, try e.g. '.jpg$' // returns full path/filename function DirList($path, $regexp='') { $l = array(); $p = $path; if ($p=='') { $p='.'; } else { if (substr($path,-1,1)!='/') { $path .= '/'; $p = $path; } } if (!is_dir($p)) return; $d = dir($p); if ($d) { while (false !== ($entry = $d->read())) { if (($regexp=='' or preg_match('%'.$regexp.'%', strtolower($entry))) and $entry[0]!='.') { $l[] = $path.$entry; } } $d->close(); } return $l; } ?> Unhandled Exception

Unhandled Exception


logo