my $cont_id = param("id");
my $rc_name = param("name");
my $rc_value = param("the_value");
my (@custrc,@mos,@objs); # declare GLOBAL vars
print "Content-type: text/html\n\n";
### SQL queries ######
# connect to database
my $dbh = DBI->connect ($dsn, $user_name, $password, { RaiseError => 1, LongReadLen => 4096 });
if($cont_id eq ""){
my $sth = $dbh->prepare ("SELECT the_value FROM contacts_customs " );
$sth->execute ();
my $out = $sth->fetchall_arrayref;
@custrc = @$out;
$sth->finish;
$dbh->disconnect;
}
print "
SANTA";
print "BESCHREIBUNG - SANTA<\/title><\/head>";
print "<\/head>";
print "";
## Process query output ###
# show the overview of available description, if none has been selected yet
if($cont_id eq ""){initial_list()}
sub initial_list {
# this function creates the initial Description of custom
# the user may then select a company and reexecute the script for more details
my %hash;
foreach my $line (@custrc){
$hash{$line->[0]}=$line->[1];
}
print "
Beschreibung
";
foreach my $key (keys(%hash)){
my $value = $key;
$value =~ s/\s/%20/g;
print "