This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
missing [2011/03/31 23:24] terning |
missing [2013/10/28 14:31] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <php> | ||
+ | $year=date(" | ||
+ | $month=lcfirst(date(" | ||
+ | $monthm=lcfirst(date(" | ||
+ | $monthf=date(" | ||
+ | $thismonth=$monthm; | ||
+ | $today=date(" | ||
+ | $cd = date(" | ||
+ | $count=0; | ||
+ | |||
+ | echo "< | ||
+ | while ( $count < 6 ) | ||
+ | { | ||
+ | $path="/ | ||
+ | $dir=$path."/ | ||
+ | $count++; | ||
+ | $event=0; | ||
+ | if ( is_dir($dir)) | ||
+ | { | ||
+ | if ($dh = opendir($dir)) | ||
+ | { | ||
+ | |||
+ | while (($file = readdir($dh)) !== false) | ||
+ | | ||
+ | if ($file != " | ||
+ | { | ||
+ | $lname=$file; | ||
+ | if( strpos($file," | ||
+ | $lname=substr_replace($file,'', | ||
+ | $handle = @fopen($dir.$file," | ||
+ | $name = fgets($handle); | ||
+ | $title = fgets($handle); | ||
+ | $date = fgets($handle); | ||
+ | fclose($handle); | ||
+ | | ||
+ | while( strpos(substr($name, | ||
+ | { | ||
+ | $name = substr($name, | ||
+ | } | ||
+ | while( strpos(substr($name, | ||
+ | { | ||
+ | $name = substr($name, | ||
+ | } | ||
+ | while( strpos(substr($title, | ||
+ | { | ||
+ | $title = substr($title, | ||
+ | } | ||
+ | while( strpos(substr($title, | ||
+ | { | ||
+ | $title = substr($title, | ||
+ | } | ||
+ | |||
+ | if( strpos($date,"," | ||
+ | $date=substr_replace($date,'', | ||
+ | $day=0; | ||
+ | if ( strpos($date," | ||
+ | $day=intval(substr($date, | ||
+ | if ( strpos($date," | ||
+ | $day=intval(substr($date, | ||
+ | | ||
+ | $mediaurl="/ | ||
+ | $mediafound = false; | ||
+ | if ( is_file($path.$mediaurl.$lname." | ||
+ | $mediafound = true; | ||
+ | |||
+ | |||
+ | if ( ( ( $monthm == $thismonth && $day < $today | ||
+ | { | ||
+ | echo "< | ||
+ | |||
+ | } | ||
+ | |||
+ | } | ||
+ | } | ||
+ | |||
+ | | ||
+ | } | ||
+ | } | ||
+ | if (date(' | ||
+ | $cd = date(" | ||
+ | else | ||
+ | { | ||
+ | $cd = date(" | ||
+ | $year=date(" | ||
+ | } | ||
+ | $month=lcfirst(date(" | ||
+ | $monthm=lcfirst(date(" | ||
+ | $monthf=date(" | ||
+ | } | ||
+ | echo "</ | ||
+ | </ |