use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$C->{TableTitle} = "Security settings";$this->out("\n	<div class=\"d-sm-flex align-items-center justify-content-between mb-4\">\n		<h1 class=\"h3 mb-2 text-gray-800\">\n");if ( $C->{TableTitleFull} ) {$this->out("				$C->{TableTitleFull}\n");} elsif ( $C->{TableTitle} ) {$this->out("				$C->{TableTitle}\n");}$this->out("		</h1>\n	</div>\n\n");$this->out(Zen::PerlHandler->get("IIaf278f35fcd8078ef5ce13063f83ed27->mnt_manage_key")->do($this->{C}));$this->out("\n");if ( $C->{INPUT}{key_installed} ) {$this->out("	<div class=\"card mb-4 py-3 border-left-primary\">\n		<div class=\"card-body\">The security key was successfully installed</div>\n	</div>\n");}$this->out("\n");if ( $C->{ErrorSeckey} ) {$this->out("	<div class=\"card mb-4 py-3 border-left-danger\">\n		<div class=\"card-body\">The security key is not specified or the keys mismatch</div>\n	</div>\n");}$this->out("\n");if ( $C->{ErrorIncorrectSeckey} ) {$this->out("	<div class=\"card mb-4 py-3 border-left-danger\">\n		<div class=\"card-body\">The security key you entered cannot unlock the data. Please enter the correct key</div>\n	</div>\n");}$this->out("\n<form name=\"SecKeyForm\" method=\"POST\">\n<input type=\"hidden\" name=\"do_it\" value=\"1\">\n\n<div class=\"card mb-4\">\n	<div class=\"card-header py-3\">\n		<h6 class=\"m-0 font-weight-bold text-primary\">\n			Credit card data encryption key\n		</h6>\n	</div>\n	<div class=\"card-body\">\n\n		<div class=\"card mb-4 border-left-primary\">\n			<div class=\"card-body\">\n\n\n");if ( $C->{ModeValidKey} ) {$this->out("		There is a valid security key installed in the system. You can change the key. If you do so, all the Credit Cards DB will be re-encrypted using the new key.\n		CHANGE KEY\n");} elsif ( $C->{ModeLostKey} ) {$this->out("		There are some encrypted Credit Cards data in your DB, but <b style=\"color:red\">the key is lost!</b> You need to enter the key again. It should be the same key that was installed earlier. If you don`t have a backup copy of the key, then the Credit Cards data cannot be recovered.\n		RECOVER THE KEY\n");} elsif ( $C->{ModeNoKey} ) {$this->out("		Here you can install a security key that Delavo will use to encrypt and protect the Credit Card data of your customers.\n		INSTALL SECURITY KEY\n");}$this->out("</div>\n</div>\n\n<div class=\"form-group row\">\n	<label class=\"col-sm-12 col-md-4 col-form-label\">Security key</label>\n	<div class=\"col-sm-12 col-md-8\"><input class=\"form-control\" type=password name=seckey></div>\n</div>\n<div class=\"form-group row\">\n	<label class=\"col-sm-12 col-md-4 col-form-label\">Confirm security key</label>\n	<div class=\"col-sm-12 col-md-8\"><input class=\"form-control\" type=password name=seckey2></div>\n</div>\n<div class=\"form-group row\">\n	<label class=\"col-sm-12 col-md-4 col-form-label\">Send by e-mail</label>\n	<div class=\"col-sm-12 col-md-8\">\n		<div class=\"custom-control custom-checkbox custom-control-inline\">\n			<input id=\"chbox_copyemail\" class=\"custom-control-input\" type=checkbox name=\"copyemail\" onChange=\"if (this.checked && ! confirm(\'Please note that if you check this option, the security key will be sent to you by e-mail through an unencrypted channel. If you understand the risk and still want a copy of the key sent to you by e-mail, click OK\')) this.checked=false;\">\n			<label for=\"chbox_copyemail\" class=\"custom-control-label\">email me a copy of the security key</label>\n		</div>\n	</div>\n</div>\n\n<div class=\"form-group row\">\n	<label class=\"col-4\"></label>\n	<div class=\"col-sm-12 col-md-8\">\n		<input type=button class=\"btn btn-primary\" value=\"Install\" onClick=\"if (confirm(\'Attention! THIS IS THE LAST TIME YOU SEE THE KEY! It will never be displayed anywhere else in Delavo. Make sure you`ve saved the key in some other safe place. If you lose the key, there will be no way to recover the encrypted data. If you are ready to proceed, click OK\')) document.forms[\'SecKeyForm\'].submit();\">\n	</div>\n</div>\n\n</div>\n</div>\n\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("");}