Ejemplo n.º 1
0
 public function display()
 {
     if (Tools::isSubmit('action') && Tools::getValue('action') == 'viewLog') {
         //loads the log content
         $log_content = CertissimLogger::getLogContent();
         $log_txt = CertissimTools::convert_encoding($log_content, 'UTF-8');
         $url_back = 'index.php?tab=AdminModules&configure=fianetfraud&tab_module=payment_security&module_name=fianetfraud&token=' . Tools::getAdminTokenLite('AdminModules');
         echo "<center><a style='padding: 3px; margin: 6px; border: 1px solid black' href='" . $url_back . "'>" . $this->l('Back to configuration page') . "</a></center><textarea style='margin: 6px' cols='160' rows='50' readOnly>{$log_txt}</textarea><div class='clear'></div><center><a style='padding: 3px; margin: 6px; border: 1px solid black' href='" . $url_back . "'>" . $this->l('Back to configuration page') . "</a></center>";
     } else {
         echo parent::display();
     }
 }
 public function initContent()
 {
     if (Tools::isSubmit('action') && Tools::getValue('action') == 'viewLog') {
         //loads the log content
         $log_content = CertissimLogger::getLogContent();
         $log_txt = htmlspecialchars($log_content, ENT_QUOTES, 'UTF-8');
         $url_back = $this->context->link->getAdminLink('AdminModules') . '&configure=fianetfraud';
         $html = "<p><a href='" . $url_back . "'>" . $this->l('Back to configuration page') . "</a></p><textarea cols='180' rows='35' Readonly>{$log_txt}</textarea><p><a href='" . $url_back . "'>" . $this->l('Back to configuration page') . "</a></p>";
         $this->context->smarty->assign('content', $html);
     } else {
         parent::initContent();
     }
 }