- else
- {
- my $sth = $dbh->prepare(qq|
- INSERT INTO currency (currency, rate, symbol, active) VALUES (?,?,?,?) |);
-
- $sth->execute( $input->param('currency'),
- $input->param('rate'),
- $input->param('symbol')||'',
- $input->param('active')||0,
- );
- }
- # END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
- $template->param(delete_confirm => 1);
- my $sth=$dbh->prepare("select count(*) as total from aqbooksellers where currency=?");
- $sth->execute($searchfield);
- my $total = $sth->fetchrow_hashref;
- my $sth2=$dbh->prepare("select currency,rate from currency where currency=?");
- $sth2->execute($searchfield);
- my $data=$sth2->fetchrow_hashref;
-
- if ($total->{'total'} >0) {
- $template->param(totalgtzero => 1);
+ my $activecurrency = GetCurrency();
+
+ $template->param(
+ loop => \@display_curr,
+ activecurrency => defined $activecurrency,
+ );
+
+ if ( $offset > 0 ) {
+ $template->param(
+ offsetgtzero => 1,
+ prevpage => $offset - $pagesize
+ );