use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$C->{HTMLTitle} = "Funnels / Log";$this->out("\n");{my $G = (ref $this)->get("/master/store/funnels/menu.html", $this->{param}) or die "no skel /master/store/funnels/menu.html";my $ctx = $this->{C};my $out = $G->execute($ctx);$this->out(@$out) if $out;}$this->out("\n");$C->{TableTitle} = "Funnel Log";$this->out("");$C->{TableClass} = II982446f8950cc3dc59e487adba22df54::IIllllIlIIllIIII($IIb39071a48a82a07eeb9256f406abebc5::llIllIlIllIIIIlI{$IIb39071a48a82a07eeb9256f406abebc5::lIlIIllllllIllIl},461,$IIb39071a48a82a07eeb9256f406abebc5::llIllIlIllIIIIlI{$IIb39071a48a82a07eeb9256f406abebc5::IIlIllIIlIIIlIIl});$this->out("");$C->{TableSearchForm} = II8dae0e141ee45f5daba6a74e4a7c3b6f::lllIllIIIllIllII($II8dae0e141ee45f5daba6a74e4a7c3b6f::lIlllIlIlIlIlIll{$II720d6e18aa34327713eb014408fc9144::lIIlIIIIlllIlIII},460,$II8dae0e141ee45f5daba6a74e4a7c3b6f::lIlllIlIlIlIlIll{$IIb39071a48a82a07eeb9256f406abebc5::llIIIIIIlIllIlIl});$this->out("\n");{my $G = (ref $this)->get("/zen/table.html", $this->{param}) or die "no skel /zen/table.html";my $ctx = $this->{C};my $out = $G->execute($ctx);$this->out(@$out) if $out;}$this->out("\n\n");my $o = Zen::PerlHandler->get(II8dae0e141ee45f5daba6a74e4a7c3b6f::IlIIllIIllIlIIll($IIb39071a48a82a07eeb9256f406abebc5::llIIlIIlIIlIllII{$IIb39071a48a82a07eeb9256f406abebc5::IlIlIIIIlllIIIlI},126,$IIb39071a48a82a07eeb9256f406abebc5::llIIlIIlIIlIllII{$II982446f8950cc3dc59e487adba22df54::IlIllIlIlIIlIlll}).'->getOrDummy')->do($C->{INPUT}{TabCustom1});$C->{Funnel} = $o->getView("" || undef);$this->out("");$C->{Steps} = Zen::PerlHandler->get(II8dae0e141ee45f5daba6a74e4a7c3b6f::lllIlIIIIlIIlIll($II720d6e18aa34327713eb014408fc9144::lIIllIIIlIlIlIIl{$II982446f8950cc3dc59e487adba22df54::IIlIIIIIlIIlIllI},46,$II720d6e18aa34327713eb014408fc9144::lIIllIIIlIlIlIIl{$II982446f8950cc3dc59e487adba22df54::IIIIIIlIIlIlIIlI}).'->search')->do(funnel_id => $C->{INPUT}{TabCustom1}, ORDER => 'title');$_ = $_->getView for @{ $C->{Steps} };$this->out("\n<br>\n<form name=\"DeleteLogsForm\" method=\"POST\" action=\"$C->{SYS}{URI}/action/Jin/FunnelVisitlog/Web/clean.html\">\n<input type=\"hidden\" name=\"funnel_id\" value=\"$C->{Funnel}{ID}\">\n<table class=\"atkMainTable\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">\n<tbody><tr>\n<td class=\"atkHeader\" colspan=\"4\">Clean logs</td>\n</tr>\n");my $in = $C->{Steps};my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{s} = -1;for my $f (@$loop) {$C->{ITERATION}{s}++;$C->{s} = $f;$this->out("<tr>\n	<td class=\"atkCell\"><input type=\"checkbox\" name=\"step_ids\" value=\"$C->{s}{id}\"></td>\n	<td class=\"atkCell\">$C->{s}{title}</td>\n	<td class=\"atkCell\">$C->{s}{numVisits} visit(s)</td>\n</tr>\n");}$this->out("<tr>\n	<td class=\"atkListerControl\" colspan=\"4\" align=\"center\">\n		<input type=\"button\" value=\"Delete visits to selected steps\" onClick=\"if (confirm(\'Please confirm - you are about to delete all visits to selected steps. Do you really want to do that?\')) document.forms[\'DeleteLogsForm\'].submit()\">\n	</td>\n</tr>\n</tbody></table>\n</form>\n\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("");}