use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$C->{HTMLTitle} = "Restore";$this->out("\n");$this->out(Zen::PerlHandler->get("II506b41badd8061a821e7d2738e8853eb->mnt_restore")->do($this->{C}));$this->out("\n");if ( $C->{action_complete} ) {$this->out("	<div class=\"card mb-4 py-3 border-left-primary\">\n		<div class=\"card-body\">\n			System has been restored\n		</div>\n	</div>\n");}$this->out("\n");if ( $C->{Form}{errors} ) {$this->out("	<div class=\"card mb-4 py-3 border-left-danger\">\n		<div class=\"card-body\">\n");my $in = $C->{Form}{errors};my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{error} = -1;for my $f (@$loop) {$C->{ITERATION}{error}++;$C->{error} = $f;$this->out("				$C->{error}{message}\n");}$this->out("		</div>\n	</div>\n");}$this->out("\n<form name=Editor action=\"$C->{SYS}{URL}$C->{ENV}{PATH_INFO}\" method=POST enctype=\"multipart/form-data\">\n<input type=\"hidden\" name=\"TabAct\">\n<input type=\"hidden\" name=\"cgi_ret\" value=\"$C->{INPUT}{cgi_ret}\">\n<input type=\"hidden\" name=\"ObjectID\" value=\"$C->{INPUT}{ObjectID}\">\n");my $in = $C->{KeepFields};my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{kf} = -1;for my $f (@$loop) {$C->{ITERATION}{kf}++;$C->{kf} = $f;$this->out("<input type=\"hidden\" name=\"$C->{kf}\" value=\"$C->{INPUT}{$C->{kf}}\">\n");}$this->out("\n<div class=\"card shadow mb-4\">\n	<div class=\"card-header py-3\">\n		<h6 class=\"m-0 font-weight-bold text-primary\">\n			Restore\n		</h6>\n	</div>\n	<div class=\"card-body\">\n		<div class=\"form-group row\">\n			<label class=\"col-sm-12 col-md-4 col-form-label\">Select backup file from ftp</label>\n			<div class=\"col-sm-12 col-md-8\">$C->{Form}{ftp_file}</div>\n		</div>\n		<div class=\"form-group row\">\n			<label class=\"col-sm-12 col-md-4 col-form-label\">Upload backup file</label>\n			<div class=\"col-sm-12 col-md-8\">$C->{Form}{upload}</div>\n		</div>\n		<div class=\"form-group row\">\n			<label class=\"col-sm-12 col-md-4 col-form-label\"></label>\n			<div class=\"col-sm-12 col-md-8\">\n				<input type=submit class=\"btn btn-primary\" name=do_it value=\"Restore backup\" onClick=\"if (! confirm(\'Are you sure?\')) return false;\">\n				<input type=button class=\"btn btn-primary\" name=do_it value=\"Return to configuration\" onClick=\"document.location=\'$C->{SYS}{URI}\' + \'/master/tools/dbbackup.html\'\">\n			</div>\n		</div>\n	</div>\n</div>\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("");}