#!/usr/bin/perl
#------------------------------------------------------------------------------
# Copyright (C) 2001 Thomax Kaulmann
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

use DBI;
use CGI;
use REBOOT;

CGI::ReadParse();


$db = REBOOT::opendb();

local @row;
local %hashrow;


##   ##            ##            ######         ##   ##
### ###           ####             ##           ###  ##
#######          ##  ##            ##           #### ##
#######          ##  ##            ##           ## ####
## # ##          ######            ##           ##  ###
##   ##          ##  ##            ##           ##   ##
##   ##          ##  ##          ######         ##   ##


$latest = time - 2592000;
$table = $db->prepare("
			SELECT *
			FROM reboot_page
			WHERE ID >= $latest
			ORDER BY id DESC, dc__title
");
$table->execute();
$table->bind_columns(\(@hashrow{@{$table->{NAME_lc}}}));

print "$REBOOT::REBOOT_BODY";
print "<base href=http://$REBOOT::OMAHOST/>
<script language=JavaScript id=\"$REBOOT::HOST\">
        function Go2(x) {
                parent.frames[3].location.href=x;
        }
</SCRIPT>
";

print "<b>Last entries (30 days)</b>";
print "<pre>";

while(@row = $table->fetchrow())
{
	REBOOT::display_line(*row, *hashrow);
}
$table->finish();



print "</pre>";
REBOOT::copyright();
