use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$C->{DSimpleMode} = "1";$this->out("");$C->{HTMLTitle} = "Sites";$this->out("\n");$this->out(Zen::PerlHandler->get("II1ff8b3618e4648adbc5b0c39eb038e7e->mnt_dashboard")->do($this->{C}));$this->out("\n\n<div class=\"dashboard\">\n	\n	<div class=\"link_section\">\n	<ul>\n");{my $G = (ref $this)->get("/ds/menu.html", $this->{param}) or die "no skel /ds/menu.html";my $ctx = $this->{C};my $out = $G->execute($ctx);$this->out(@$out) if $out;}$this->out("	</ul>\n	</div>\n</div>\n\n\n<div id=\"dashboard_section\">\n<div class=\"dashboard_row\">\n\n");$C->{add_new_site_section} = sub {$this->replaceOutput([]);$this->out("<div id=\"main_section\">\n<center>\n	<input type=\"button\" class=\"\"btn btn-primary\"\" value=\"Create new site\" onClick=\"document.location = \'editsite.html\'; return false\">\n	<br><br><br>\n</center>\n</div>\n");return join("",@{ $this->restoreOutput });};$this->out("\n");if ( scalar(@{ $C->{SitesList} }) > 3 ) {$this->out("	".&{$C->{add_new_site_section}}."\n");}$this->out("\n");my $in = $C->{SitesList};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("<ul>\n	<li class=\"heading\"><h3>$C->{s}{title}</h3></li>\n	<li>\n		<p><strong>$C->{s}{sales}{today}</strong> today <small>|</small> This month: <span>$C->{s}{sales}{thismonth}</span></p>\n	</li>\n	<li>\n		<p><strong>$C->{s}{customers}{total} customers</strong>: <span>$C->{s}{customers}{today} today</span> <small>|</small> <span>$C->{s}{customers}{yesterday} yesterday</span> <small>|</small> <span>$C->{s}{customers}{thisweek} this week</span> <small>|</small> <span>$C->{s}{customers}{thismonth} this month</span></p>\n	</li>\n	<li class=\"last\">\n		<p><input type=\"button\" class=\"\"btn btn-primary\"\" onClick=\"document.location = \'editsite.html?ObjectID=$C->{s}{id}\'\" value=\"View / Set up Site\"></p>\n	</li>\n</ul>\n");}$this->out("\n</div>\n</div>\n\n".&{$C->{add_new_site_section}}."\n\n");{my $G = (ref $this)->get("/ds/headfoot.html", $this->{param}) or die "no skel /ds/headfoot.html";my $out1 = $this->getOutput;$C->{central_content} = join('', @$out1);@$out1 = ();my $out2 = $G->execute($C);$this->out(@$out2) if $out2;}$this->out("");}