<?php
/*
 * @component UserPoints
 * @copyright Copyright (C) 2015-2022 Bernard Gilly - Adrien Roussel - Martin Brampton
 * @license : GNU/GPL
 * @Website : https://remository.com
 */

defined( '_JEXEC' ) or die( 'Restricted access' );

use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;

//         <div class="qrcode"><img src="{$show(Uri::base())}components/com_userpoints/assets/coupons/QRcode/250/{$show(strtoupper($this->couponcode))}.png" alt="" align="absmiddle" /></div>

$show = function ($string) {
    return htmlspecialchars($string, ENT_QUOTES, false);
};

echo <<<PRINT_STUFF
<br />
<div class="printcoupon"><a href="javascript:window.print()">{$show(Text::_( 'AUP_PRINT' ))}</a></div>
<br /><br />
<div class="cut"></div>
<div class="coupon"><div class="couponcolor">
	<div class="infocoupon">	
        <h1>{$this->coupon->couponcode}</h1>
        <h2>{$this->getFormattedPointsAdm($this->coupon->points)} {$show(Text::_( 'AUP_POINTS' ))}</h2>
	</div>
        <div class="qrcode"><img src="{$this->coupon->QR(200)}" alt="" align="absmiddle" /></div>
	<div class="infosite">
        $this->sitename - {$show(Uri::root())}
	</div>
</div></div>
        
PRINT_STUFF;
