#!/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();

#local $Hquery;
#$Hquery = new CGI();
#print $Hquery->header('text/html');
local ($db, $table, @row);
local ($table, %hashrow);


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

$db = REBOOT::opendb();

$table = $db->prepare("
			SELECT *
			FROM users
			ORDER BY username
");
$table->execute();
$table->bind_columns(\(@hashrow{@{$table->{NAME_lc}}}));

print "
<HTML>
<HEAD>

<TITLE>Radio Internationale Stadt - Music</TITLE>


</HEAD>
$REBOOT::REBOOT_BODY
<b>Contributor list</b>
<center>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=4>

<TR ALIGN=LEFT VALIGN=TOP>
    <TD ALIGN=LEFT VALIGN=BOTTOM NOWRAP WIDTH=180>contributor</TD>
    <TD ALIGN=LEFT VALIGN=BOTTOM NOWRAP WIDTH=180>name/org/label</TD>
    <TD ALIGN=LEFT VALIGN=BOTTOM NOWRAP WIDTH=180>e-mail</TD>
</TR>

";


while(@row = $table->fetchrow())
{
	local $url, $st, @row2;
	$st=$db->prepare("select * from reboot_page where username like '%$hashrow{username}%'");
	$st->execute();
	@row2 = $st->fetchrow();
	$st->finish();
	
	print "<tr><td align=top>";
	if($#row2>0) {
		print "<a href=$REBOOT::CGI_BINS/reboot-query?skrit=username&dep=$hashrow{username}><img src=/REBOOT/quadrat2.gif border=0></a> <a href=$REBOOT::CGI_BINS/reboot-query?skrit=username&dep=$hashrow{username}>$hashrow{username}</a>
		";
	} else {
		print "<img src=/REBOOT/quadrat2.gif> $hashrow{username}";
	}
	print "
	</td>
	<td valign=top>
		<a href=$REBOOT::CGI_BINS/reboot-cinfo?username=$hashrow{username}>$hashrow{name}</a>
	</td>
	<td valign=top>
		<a href=mailto:$hashrow{email}>$hashrow{email}</a>
	</td>
</tr>
";
}
$table->finish();

print "</table>";
print " <IMG SRC=/REBOOT/balken.gif ALIGN=BOTTOM BORDER=0> ";

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