use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$this->out(Zen::PerlHandler->get("II62d5c6ca676ab65988d8c806b04dc848->mnt_leaderboard")->do($this->{C}));$this->out("");$C->{HTMLTitle} = "Leaderboard";$this->out("");{my $G = (ref $this)->get("/master/plugins/syevents/header.html", $this->{param}) or die "no skel /master/plugins/syevents/header.html";my $ctx = $this->{C};my $out = $G->execute($ctx);$this->out(@$out) if $out;}$this->out("\n<body>\n\n<div class=\"container\">\n");if ( $C->{total} ) {$this->out("");$C->{pager} = sub {$this->replaceOutput([]);$this->out("");if ( $C->{total} > $C->{Pagesize} && $C->{Pagesize} > 0 ) {$this->out("			$C->{total} Leaders<br>\n\n");$C->{cur_page} = $C->{INPUT}{page} || 1;$this->out("\n");my $in = [1..$C->{pages}];my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{p} = -1;for my $f (@$loop) {$C->{ITERATION}{p}++;$C->{p} = $f;$this->out("");$C->{from} = ($C->{p} - 1) * $C->{Pagesize} + 1;$this->out("");$C->{to} = $C->{p} * $C->{Pagesize} <= $C->{total} ? $C->{p} * $C->{Pagesize} : $C->{total};$this->out("");$C->{link} = $C->{from} == $C->{to} ? $C->{from} : $C->{from} . '-' . $C->{to};$this->out("\n");if ( $C->{cur_page} == $C->{p} ) {$this->out("					$C->{link}&nbsp;\n");} else {$this->out("					<a href=\"?referer_id=$C->{INPUT}{referer_id}$C->{add_param}&page=$C->{p}\">$C->{link}</a>&nbsp;\n");}$this->out("");}$this->out("");}$this->out("		<br>\n");return join("",@{ $this->restoreOutput });};$this->out("	".&{$C->{pager}}."\n\n	<table class=\"table\">\n	  <thead>\n	    <tr>\n	      <th scope=\"col\">Name</th>\n	      <th scope=\"col\" class=\"text-center\">Points</th>\n	    </tr>\n	  </thead>\n		<tbody>\n");my $in = $C->{List};my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{SYref} = -1;for my $f (@$loop) {$C->{ITERATION}{SYref}++;$C->{SYref} = $f;$this->out("	<tr>\n		<td>$C->{SYref}{name}</td>\n		<td class=\"text-center\">$C->{SYref}{points}</td>\n	</tr>\n");}$this->out("</tbody>\n</table>\n	".&{$C->{pager}}."\n");} else {$this->out("	<br>This list does not contain any leaders yet.<br><br>\n");}$this->out("</div>\n");{my $G = (ref $this)->get("/master/plugins/syevents/footer.html", $this->{param}) or die "no skel /master/plugins/syevents/footer.html";my $ctx = $this->{C};my $out = $G->execute($ctx);$this->out(@$out) if $out;}$this->out("");}