Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/include/account/genVoucher.php
<?php
if (!isset($oreon))
                exit();
$fp = fopen("tmp/cards.html", "w+") or die("Couldn't create new file");

fwrite($fp,'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Prepaid Internet Cards List</title>
</head>
<body>');
$nBp=get_plan_name($idBp);
fwrite($fp,"<br><br>User List For Billing Plan :<span style=\"font-weight: bold;\"> $nBp</span>  &nbsp; &nbsp; &nbsp; Created the ");
fwrite($fp,'<span style="font-weight: bold;">');
fwrite($fp,date("d/m/Y H:m:s"));
fwrite($fp,"<span><br>");

fwrite($fp,'
<br>
<br>
<br>
<table border="4" style="text-align: left; width: 720px; height: 58px;"
 cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td border="1" style="width: 100px; background-color: rgb(192, 192, 192);">Login</td>
<td border="1" style="background-color: rgb(192, 192, 192); width: 70px;">Password</td>
<td border="1" style="background-color: rgb(192, 192, 192); width: 50px;">Validity</td>
<td border="1" style="background-color: rgb(192, 192, 192); width: 60px;">Price Plan</td>
<td border="1" style="background-color: rgb(192, 192, 192); width: 60px;">Room Number</td>
<td border="1" style="background-color: rgb(192, 192, 192); width: 120px;">Guest Name </td>
<td border="1" style="background-color: rgb(192, 192, 192); width: 80px;"> Date </td>
<td border="1" style="background-color: rgb(192, 192, 192); width: 93px;"> Operator </td>
</tr>');
$pBp=get_plan_price($idBp);

foreach($UserPass as $id => $pass ) {
fwrite($fp,"<tr>
      <td >$id</td>
      <td >$pass</td>
      <td >$display</td>
      <td >$pBp</td>
      <td >.</td>
      <td >.</td>
      <td >.</td>
      <td >.</td>
      ");
}

fwrite($fp,"</tr>
  </tbody>
  </table><br><br>
</body>
</html>");

fclose($fp);
?>
Return current item: phpMyPrepaid