73,13 → 73,24 |
} |
|
sub select_source { |
my $value = shift // ""; |
my $selection = shift; |
my $colName = "channel"; |
my $table = "channels"; |
my @optionList; |
my $dbh = WebDB::connect (); |
|
my $cathan = $dbh->prepare("select distinct $colName from $table order by $colName"); |
|
$cathan->execute(); |
while (my ($cat) = $cathan->fetchrow) { |
push @optionList, $cat; |
} |
|
return $h->select ({ name=>"source" }, |
[ map { $value eq $_ ? |
[ map { $selection eq $_ ? |
$h->option ({ value=>$_, selected=>[] }, $_) : |
$h->option ({ value=>$_ }, $_) |
} "", qw(Direct Fellow Retail SCG) ]); |
} "", @optionList ]); |
} |
|
sub select_roaster { |