use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$C->{DSimpleMode} = "1";$this->out("");$C->{HTMLTitle} = "Pages";$this->out("\n");$this->out(Zen::PerlHandler->get("II685e8514d994be5c2c3ed4e5297fb6b2->mnt_load_themes_from_files")->do($this->{C}));$this->out("");$this->out(Zen::PerlHandler->get("II3176ca960eb1e6c3c9174c6c2fbe885e->mnt_list")->do($this->{C}));$this->out("\n");my ($cfg, $sec) = "II661a28aacaa6830f99dea1bc5f86cfb5::dsimple_types" =~ /^([\w\:]+)::(\w+)$/;die('invalid section syntax: ' . "II661a28aacaa6830f99dea1bc5f86cfb5::dsimple_types") unless $cfg && $sec;$C->{Types} = Zen::PerlHandler->get('Zen::Config->get')->do($cfg)->{$sec};$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\n<div id=\"main_section\">\n<center>\n\n<script>\n	function goAddNew(type)\n	{\n		if (title = prompt(\'Please enter a title for the new page:\'))\n		{\n			var form = document.forms[\'Editor\'];\n			form.elements[\'add_new\'].value = type;\n			form.elements[\'new_title\'].value = title;\n			form.submit();\n		}\n		\n		return false;\n	}\n</script>\n\n<form name=\"Editor\" method=\"POST\" action=\"$C->{SELF_URI_NO_QS}\" enctype=\"multipart/form-data\">\n<input type=\"hidden\" name=\"add_new\">\n<input type=\"hidden\" name=\"new_title\">\n\n<table border=0 cellpadding=0 cellspacing=1 class=atkMainTable>\n<tr><td class=atkHeader colspan=2>Pages</td></tr>\n<tr>\n	<td class=atkListerFieldnames width=\"140px\">Page type</td>\n	<td class=atkListerFieldnames>Title</td>\n</tr>\n");my $in = $C->{List};my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{r} = -1;for my $f (@$loop) {$C->{ITERATION}{r}++;$C->{r} = $f;$this->out("<tr>\n	<td class=atkCell>$C->{Types}{$C->{r}{type}}</td>\n	<td class=atkCell>\n");if ( $C->{r}{type} eq 'oto' ) {$this->out("			<a href=\"$C->{SYS}{URI}/ds/pages/edit_oto.html?ObjectID=$C->{r}{id}\'\"><b>$C->{r}{title}</b></a>\n");} else {$this->out("			<a href=\"#\" onClick=\"document.location = \'$C->{SYS}{URI}/ds/pages/edit_template.html?tmpl_type=$C->{r}{tmpl_type}&tmpl_name=$C->{r}{tmpl_name}&theme=$C->{r}{theme}\'\"><b>$C->{r}{title}</b></a>\n");}$this->out("	</td>\n</tr>\n");}$this->out("<tr>\n\n	<td class=atkListerControl align=center colspan=2>\n		<input type=button class=\"btn btn-primary\" value=\"Add Squeeze page\" onClick=\"return goAddNew(\'squeeze\')\">\n		<input type=button class=\"btn btn-primary\" value=\"Add Sales page\" onClick=\"return goAddNew(\'sales\')\">\n		<input type=button class=\"btn btn-primary\" value=\"Add Checkout page\" onClick=\"return goAddNew(\'checkout\')\">\n		<input type=button class=\"btn btn-primary\" value=\"Add OTO\" onClick=\"return goAddNew(\'oto\')\">\n		<input type=button class=\"btn btn-primary\" value=\"Add Thank you Page\" onClick=\"return goAddNew(\'ty\')\">\n	</td>\n</tr>\n</table>\n\n</form>\n\n</center>\n</div>\n\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("");}