#!/usr/bin/perl

use strict;
use CGI;

use Opals::Context;
use Opals::Constant;
use Opals::Template qw(
    tmpl_read
    tmpl_write
);
use POSIX qw(
    ceil
    floor
);

use JSON;
my $dbh = Opals::Context->dbh();
END { $dbh->disconnect(); }

my $cgi = CGI->new;
my $input = $cgi->Vars();
my  $awsId =Opals::Context->preference('amazonId');
my  $awsSecretKey =Opals::Context->preference('amazonSecreteKey');
my  $syndeticsId =Opals::Context->preference('syndeticsId');
if($syndeticsId && $syndeticsId ne''){$awsId ="";}
 my $pfId         = $input->{'pfId'};
 my $genreId      = $input->{'genreId'};


my ($permission, $cookieList, $template) = tmpl_read(
    {
        dbh             => $dbh,
        cgi             => $cgi,
        tmplFile        => 'search/topicWall.tmpl',
    }
);
if(defined  $pfId && $pfId>0 || defined  $genreId && $genreId>0){
        $template->param(pfId   =>$pfId,
                         genreId=>$genreId,
                         delOp  =>$input->{'delOp'}|| undef);
    }

#=======================================================
tmpl_write($dbh, $cgi, $cookieList, $template);




