<?php
/* dhalbe-Admin - a webbased application for simplifying working with
a Free-Radius server and an MySQL as Backend-Database. Common tasks
are generating prePaid accounts / cards in various formats, designing
layout of printable cards and much more.
Copyright (C) 2004 dhalbe-Admin Project
Copyright (C) 2004 Michael Conrad (hide@address.com),
Copyright (C) 2004 Christian Roedel (hide@address.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
if (!isset($oreon))
exit();
if(isset($_POST['print1'])) { $qwprint =1;}
if(isset($_POST['print2'])) { $qwprint =1;}
if(isset($_POST['print3'])) { $qwprint =1;}
if(isset($qwprint)) {
include('include/account/genPrePaidMulti.php');
}
$q1 = "select Id,NameBp,TimeBp,PriceBp,TypeBp From BillingPlan Where TypeBp='Time' AND LocationID='".$_SESSION['locID']."' AND PublishBp='1'"; // get all the timed cards
//$numresults=mysql_query($q1); // <------ FIGURE OUT HOW MANY RESULTS WE ARE PULLING
//$numrows=mysql_num_rows($numresults);
$numresults=$oreon->database->database->query($q1); // <------ FIGURE OUT HOW MANY RESULTS WE ARE PULLING
$numrows=$oreon->database->database->result_num_rows();
//printf('<form action="index.php?site=generiereprePaidMehrfach"method="post">');
echo('<table STYLE="width: 200px; background-color:#666699;" border="0">');
echo('<tr><td><big><span style="font-family: Aircut; font-size: 22px; font-weight: bold;">Quick Print</span></big><br></td></tr><tr><td></td></tr>');
while ($row = $oreon->database->database->fetch_object($numresults)) {
printf('<tr><td><form name="center" action="phpmyprepaid.php" method="post">');
printf('<div><input type="hidden" name="buttonID" value="CR_Quick"></div>');
printf("<div><input type=\"hidden\" name=\"Bp\" value='".$row->Id."'></div>");
printf('<div style="text-align: center;"><input type="submit" class="smallButton" name="submit" value="'.$row->NameBp.'"/>');
echo ('</div>');
echo '</form></td></tr>';
}
if(isset($qwprint)) {
//echo('<tr><td class="fieldcell">');
echo '<a href="cards.ppc"><img src="images/ppc-32.png" title="Download and auto-print .ppc file" border=0></a></p>';
}
echo "</table>";
?>