public function getHtml() { $auth = new PayqrModuleAuth(); if (isset($_POST["exit"])) { $auth->logOut(); } $user = $auth->getUser(); if ($user) { $button = new PayqrButtonPage($user); if (isset($_POST["PayqrSettings"])) { $button->save($_POST["PayqrSettings"]); } $html = $button->getHtml(); return $html; } }
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ require_once __DIR__ . '/../../PayqrConfig.php'; $auth = new PayqrModuleAuth(); if (isset($_POST["exit"])) { $auth->logOut(); } $user = $auth->getUser(); if ($user) { $button = new PayqrButtonPage($user); if (isset($_POST["PayqrSettings"])) { $button->save($_POST["PayqrSettings"]); } $html = $button->getHtml(); echo $html; } ?> <style> .row { margin: 5px 0; } label { font-weight: bold;