<?php 
session_start();
require('../db.php'); 
include('../inc/func.php');
include('../inc/logo.php');
?> 


    <?php 
 $GetHistory = "SELECT * FROM mypin WHERE email='$user' and ref='$_GET[ref]' ";
$qryHistory = $conn->query($GetHistory);
          ?>




  <table width="100%">
    <tr>
    <td>
    <form id="form1" name="form1" method="post" action="voucher.php">
    <table class="mystyle" cellpadding="5" width="100%">
   <?php
	$no = 0;
	$siteurl = $_SERVER['SERVER_NAME'];

	while($ticket_row = $qryHistory->fetch_assoc()){ 

		if($no == 0)
		{
		?>
        <tr>
        <?php
		}
		?>
        <td style="border:2px dotted"><?php 

if(strtolower($ticket_row['net'])=='mtn') { echo "<small style='font-size:15px'><table><tr><td><img src='../assets/images/mtn.jpg' height='40' width='40' /> </td><td> www.$siteurl <br/> ".strtoupper($ticket_row['net'])."  N".$ticket_row['amount']."  </td></tr></table></small>"; }
elseif(strtolower($ticket_row['net'])=='airtel') { echo "<small style='font-size:15px'><table><tr><td><img src='../assets/images/airtel.jpg' height='40' width='40' /> </td><td> www.$siteurl<br/> ".strtoupper($ticket_row['net'])." N".$ticket_row['amount']."  </td></tr></table></small>"; }
elseif(strtolower($ticket_row['net'])=='glo') { echo "<small style='font-size:15px'><table><tr><td><img src='../assets/images/glo.jpg' height='40' width='40' /> </td><td> www.$siteurl<br/> ".strtoupper($ticket_row['net'])."  N".$ticket_row['amount']."  </td></tr></table></small>"; }
elseif(strtolower($ticket_row['net'])=='9mobile') { echo "<small style='font-size:15px'><table><tr><td> <img src='../assets/images/9mobile.jpg' height='40' width='40' /> </td><td> www.$siteurl<br/> ".strtoupper($ticket_row['net'])."  N".$ticket_row['amount']." </td></tr></table></small>"; } ?>
 <?php
echo "<small style='font-size:15px'><table cellpadding='2'><tr><td>PIN:</td><td><b>".$ticket_row['pins']."</b></td></tr>
<tr><td>Serial:</td><td>".$ticket_row['serial']."</td><td>".$ticket_row['date']."</td></tr>
</table></small>";

$no = $no + $nou;
?>
</td>
        <?php
		if($no ==$yes)
		{
		?>
        </tr>
        <?php
		$no =$yee;
		}
	}
    ?>
      </table>
      </form>
      </td>
    </tr>
    </table>
</body>
  </div>
  </div>
      </div>
  </div>