#!/usr/bin/perl
use File::Copy;


require "blendcommon.cgi";
PrintHeader();



$|=1;


@monthname =
("january","february","march","april","may","june",
"july","august","september","october","november", "december");




($sec,$min,$hour,$mday,$mon,$year) = localtime(time);
$year += 1900;


$fullname = $dirwwwroot."/".$year.$monthname[$mon]."/heart.html";


print<<__EOQ__;
        <FRAME NAME="newmaticlist" SRC="/blend/works/$year/$mon">

<html><head><title>New Submissions</title></head><BODY  BGCOLOR="#FFFFFF"  TEXT="#000000"    LINK="#000088" VLINK="#888888" ALINK="#FF0000" >

<br><br><br>
Welcome to the Blender of Love "Latest Works" page!<br><br>

Here you can see the latest pieces that have been sent into<br> 
the Blender<br>
...fresh, raw, uncensored--all of that!<br><br>

(Poems listed in reverse chronological order.)

__EOQ__



if (! (-e $fullname)){ #link for last month
    #since month is already zero based we don't have to subtract for number
    if($mon == 0){
	$mon = 12;
	$year--;
    }
    if(length($mon) == 1) { $mon = "0".$mon;}    
    print <<__EOQ__;
<br><br><br>
    Since it looks like the new Blender Digest isn't here yet, you
   can browse
    <A href="/blend/works/$year/$mon/"
  target="newmaticlist"
    >last month's entries instead</a>.<br>


__EOQ__

}












