<%perl> my $data; if($ARGS{action} eq "search_results") { $data = $m->comp("get_search_results.mas", search_type => $ARGS{search_type}, mls => $ARGS{mls}, type => $ARGS{type}, number => $ARGS{number}, name => $ARGS{name}, city => $ARGS{city}, minprice => $ARGS{minprice}, maxprice => $ARGS{maxprice}, minbeds => $ARGS{minbeds}, maxbeds => $ARGS{maxbeds}, maxbaths => $ARGS{maxbaths}, minfoot => $ARGS{minfoot}, maxfoot => $ARGS{maxfoot}, minacres => $ARGS{minacres}, maxacres => $ARGS{maxacres}, acre_type => $ARGS{acre_type}, acre_view => $ARGS{acre_view}, minstories => $ARGS{minstories}, maxstories => $ARGS{maxstories}); } elsif($ARGS{action} eq "details") { $data = $m->comp("listing_details.mas", house => $ARGS{propid}); } elsif($ARGS{action} eq "featured") { $data = $m->comp("get_featured.mas", type => $ARGS{action}); } elsif($ARGS{action} eq "quad") { $data = $m->comp("get_search_results.mas", county => $ARGS{section}); } else { $data = $m->comp("search_template.mas", vars => "$ENV{SCRIPT_NAME}?action=search_results", geo => $ARGS{geo}, area => $ARGS{area}); } $data = $m->comp("../admin_template.mas", body => $data, template => 'main'); print $data;