use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$C->{HTMLTitle} = "Export";$this->out("\n");$C->{INPUT}{TabCustom1} ||= "tables";$this->out("\n<div style=\"text-align: center\">\n");my $in = [ { name => 'tables', title_menu => 'Users / Sales', }, { name => 'comms', title_menu => 'Commissions', }, { name => 'fulldb', title_menu => 'Full DB Export', }];my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{t} = -1;for my $f (@$loop) {$C->{ITERATION}{t}++;$C->{t} = $f;$this->out("");if ( $C->{ITERATION}{t} ) {$this->out("	|\n");}$this->out("	\n");if ( $C->{INPUT}{TabCustom1} eq $C->{t}{name} ) {$this->out("		<b>$C->{t}{title_menu}</b>\n");} else {$this->out("		<a class=\"jinTableLink\" href=\"$C->{SYS}{URL}/master/tools/export.html?TabCustom1=$C->{t}{name}\">$C->{t}{title_menu}</a>\n");}$this->out("");}$this->out("</div>\n<br>\n\n");if ( $C->{INPUT}{TabCustom1} eq 'tables' ) {$this->out("\n");{my $G = (ref $this)->get("/master/tools/export/tables.html", $this->{param}) or die "no skel /master/tools/export/tables.html";my $ctx = $this->{C};my $out = $G->execute($ctx);$this->out(@$out) if $out;}$this->out("\n");} elsif ( $C->{INPUT}{TabCustom1} eq 'comms' ) {$this->out("\n");{my $G = (ref $this)->get("/master/tools/export/comms.html", $this->{param}) or die "no skel /master/tools/export/comms.html";my $ctx = $this->{C};my $out = $G->execute($ctx);$this->out(@$out) if $out;}$this->out("\n");} elsif ( $C->{INPUT}{TabCustom1} eq 'fulldb' ) {$this->out("\n");{my $G = (ref $this)->get("/master/tools/export/fulldb.html", $this->{param}) or die "no skel /master/tools/export/fulldb.html";my $ctx = $this->{C};my $out = $G->execute($ctx);$this->out(@$out) if $out;}$this->out("\n");}$this->out("\n");{my $G = (ref $this)->get("/headfoot/hf_main.html", $this->{param}) or die "no skel /headfoot/hf_main.html";my $out1 = $this->getOutput;$C->{central_content} = join('', @$out1);@$out1 = ();my $out2 = $G->execute($C);$this->out(@$out2) if $out2;}$this->out("");}