<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet"> 
<title>QR CODE SCAN</title>

<style>

@font-face{
font-family:myFirstFont;
src:url(css/Roboto-Light.ttf);
}

body{
background-color:#CCCCCC;		
 font-family: myFirstFont;	
}

.line_div
{
width:100%;
float:left;	
margin-bottom:20px;
text-align: center;

}

.left_div{
width:50%;
float:left;	

}

.right_div{
width:50%;
float:left;	

}

.fa{
color:#093;	
}

.title_span{
color:#093;	
font-size:18px;
margin-top:5px;
}


@media only screen and (-webkit-min-device-pixel-ratio:0) and (max-width: 700px) {
  .left_div{
width:90%;
float:left;	
margin-left:5%;
margin-bottom:10px;
}

.right_div{
width:90%;
float:left;	
margin-left:5%;
margin-bottom:10px;
}
}

</style>

</head>
<body>
<?php
// 0:Name, 1: vat, 2: address, 3 : phone
$customer_array = array(
1002=>array(0=>"AL QUMMAH AL SHAMINA TRADING EST.",1=>"310712341900003",2=>"DUBA-DUHKAN2, AL MINA ROAD-KSA",3=>"+0966532707027, 569741847"),
1003=>array(0=>"BADAR AL HARBI TRADING EST.",1=>"301077694100003",2=>"YANBU KSA",3=>"014 3961979"),
1005=>array(0=>"HELLO BABY",1=>"300041174500003",2=>"BATHA - RIYAD",3=>"0114044525"),
1006=>array(0=>"BADAR AL HARBI TRADING EST.",1=>"301077694100003",2=>"GENERAL ROAD ,NEAR AL BILAD BANK ,RABIGH-KSA",3=>"0505169590"),
1007=>array(0=>"GLOW ARABIA TRADING EST.",1=>"301356058200003",2=>"YAMBU AL BAHAR KINGDOM SOUDHI ARABIA",3=>"0506330259"),
1010=>array(0=>"MYOWN",1=>"300041174500003",2=>"BATHA-RIYAD",3=>"0114044525"),
4=> "Toyota"); 


$document_array = array(
1=>array(0=>"TAX INVOICE",1=>"TAX INVOICE"),
2=>array(0=>"CREDIT/DEBIT NOTE",1=>"CREDIT/DEBIT NOTE")); 


$url=@$_GET['pybjx'];
/*$url="MTAwMXx8MjcvTm92LzIwMjEgMTA6MjQ6MDAgQU18MTMwLjAwMDB8Ni4xOTAw";*/
$url_dec=base64_decode(urldecode($url));
$val_arr=explode("|",$url_dec);

/*Array ( [0] => 1001 [1] => document_type  [2] => invoice number [3] => 27/Nov/2021 10:24:00 AM [4] => 130.0000 [5] => 6.1900 )*/ 
echo "<br><br>";

?>

<div class="line_div">
<i class="fa fa-qrcode fa-4x" aria-hidden="true" ></i>
</div>

<div class="line_div">
<div class="left_div">
<i class="fa fa-building fa-2x" aria-hidden="true"></i>
<br />
<span class="title_span">Seller's Name</span>
<br />
<?php echo $customer_array[$val_arr[0]][0]; ?>
</div>
<div  class="right_div">
<i class="fa fa-file-text-o fa-2x" aria-hidden="true"></i><br />
<span class="title_span">VAT Registration Number of Seller</span>
<br />
<?php echo $customer_array[$val_arr[0]][1]; ?>
</div>
</div>




<div class="line_div">
<div class="left_div">
<i class="fa fa-file-text-o fa-2x" aria-hidden="true"></i>
<br />
<span class="title_span">Document Type</span>
<br />
<?php echo $document_array[$val_arr[1]][0]; ?>
</div>
<div  class="right_div">
<i class="fa fa-file-text-o fa-2x" aria-hidden="true"></i><br />
<span class="title_span"><?php echo $document_array[$val_arr[1]][1]; ?> No</span>
<br />
<?php echo $val_arr[2]; ?>
</div>
</div>



<div class="line_div">
<div class="left_div">

<i class="fa fa-calendar fa-2x" aria-hidden="true"></i>
<br />
<span class="title_span">TimeStamp Of <?php echo $document_array[$val_arr[1]][1]; ?> (Date and Time)</span>
<br />

<?php echo $val_arr[3]; ?>

</div>
<div  class="right_div">

<i class="fa fa-money fa-2x" aria-hidden="true"></i><br />
<span class="title_span">VAT Total</span>
<br />
<?php echo $val_arr[5]; ?>

</div>
</div>



<div class="line_div">
<div class="left_div">


<i class="fa fa-money fa-2x" aria-hidden="true"></i><br />
<span class="title_span"><?php echo $document_array[$val_arr[1]][1]; ?> total(with VAT)</span>
<br />
<?php echo $val_arr[4]; ?>

</div>
<div  class="right_div">
</div>
</div>

</body>
</html>
