<!DOCTYPE html>
<!-- V.code = Voucher Code| V.Minutes = Minutes | V.Amount = Price | id="qrcode-{{ v.recno }}" = QR CODE Remove if you want-->
<html>
<head>
[removed][removed]
[removed][removed]
<style>
.print {
width: 180px;
height: 85px;
border: 1px solid black;
text-align: center;
display: inline-table;
font-size : 8px;
margin : 5px;
}
.qrcode {
/*margin: auto;*/
width: 42px;
padding: 2px;
float: left;
}
img {
}
.top-block {
border-bottom: 1px solid black;
color : #00B0F0;
font-weight: bold;
}
.code-block {
border-bottom: 1px solid black;
line-height: 1.1 !important;
}
.left-block{
width: 160px;
height : inherit;
float: left;
}
.info-block {
height : inherit;
margin-left: -35px;
width : 195px;
line-height: 0.8 !important;
text-align: left;
}
.right-block{
height : inherit;
margin-left: 160px;
border-left: 1px solid black;
padding-bottom: 3px;
}
.right-block > span{
color : white;
font-size : 10px;
writing-mode: vertical-rl;
text-orientation: sideways-right;
margin-top: 5px;
}
.rotate {
transform: rotate(-180deg);
-webkit-transform: rotate(-180deg);
-moz-transform: rotate(-180deg);
-ms-transform: rotate(-180deg);
-o-transform: rotate(-180deg);
}
.code-style {
font-family: Consolas, monaco, monospace;
font-size: 20px;
font-style: bold;
font-variant: normal;
font-weight: 700;
letter-spacing : 3px;
}
.ft-sm {
font-size : 7px;
}
.ft-xs {
font-size : 6px;
}
.ft-bold {
font-weight:bold;
}
.ft-italic {
font-weight:italic;
}
.ft-blue {
color : #00B0F0;
}
</style>
</head>
<body>
{% for v in vcodes if v.recno %}
<span>ENTER CODE @ HTTP://10.0.0.1
</span>
<span class="code-style">{{ v.vcode }}
</span> <br>
<span id="vtime-{{ v.vcode }}" >{{ v.minutes }}
</span><br>
<div id="qrcode-{{ v.recno }}"> </div>
<span class="ft-bold ft-xs">CONNECT TO WIFI
</span><br>
<span class="ft-blue ft-bold ft-sm">LBP PISO WIFI
</span> <br>
<span class="ft-xs">Enter you voucher code then press submit.
</span><br>
<span class="ft-xs">To ensure
<span red;">FAST CONNECTION SPEED
</span> is achieved at
<span red;">FULL WIFI SIGNAL
</span>.
</span><br>
<span class="ft-xs ft-italic">GET your
<span green;">FREE TIME
</span> Everyday.
</span><br>
<div class="right-block" ((v.amount == 5)? "#00B0F0":((v.amount == 10)? "#00B0F0":((v.amount == 20)? "#4D269A":((v.amount == 50)? "#FF66CC":((v.amount == 100)? "#FF0000":((v.amount == 300)? "#000000":"#666666"))))))}};">
<span class="rotate" >Php {{ v.amount }}
</span>
<!-- Start QR Code
End Qr Code -->
{% endfor %}
[removed]
{% for qr in vcodes if qr.recno %}
new QRCode(document.getElementById("qrcode-{{ qr.recno }}"), { text: "{{ qr.vcode }}", width: 40, height: 40});
{% endfor %}
function ConvertMinutes(num){
d = Math.floor(num/1440); // 60*24
h = Math.floor((num-(d*1440))/60);
m = Math.round(num`);
if(d>0){
return(((d > 1)? d+" DAYS ":d+" DAY ")+((h > 0)? h+" HOURS ":"")+((m > 0)? m+" MINUTES":""));
}else{
return(((h > 1)? h+" HOURS ":h+" HOUR ")+((m > 0)? m+" MINUTES":""));
}
}
{% for v in vcodes if v.recno %}
var tspan = document.getElementById("vtime-{{ v.vcode }}")[removed];
var dval = parseInt(tspan);
document.getElementById("vtime-{{ v.vcode }}")[removed] = ConvertMinutes(dval);
{% endfor %}
[removed]
</body>
</html>
Replies to Re: Re: LPB Print Voucher Template
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}