Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/include/display/printListUserHTML.php
<?php
include ('../../config.inc.php');

Session::Start();
include_once ("../configuration/".$_SESSION['gatewayType'].".attr");
if ($debug)	echo " SEEEEEEEEEEEEEEEE APRS ".session_id();
$oreon=$_SESSION['oreon'];
$dateFormat=$oreon->phpmyprepaid['display_date_format'];
$octet_type=$oreon->phpmyprepaid['octet_type'];
if (isset($_POST['type']))
	        $type=$_POST['type'];

if (isset($_POST['attr'])) {
	$attrr=$_POST['attr'];
	$attr="Attribute='".$_POST['attr']."'";
}

if (isset($_POST['db']))
	        $db=$_POST['db'];

if (isset($_POST['div']))
	        $div=$_POST['div'];
if (isset($_POST['exp']))
	        $exp=$_POST['exp'];
$accountab=split(',',$_POST['id']);

if ($debug)	echo " DATE FORMAT ".$dateFormat;

echo'<!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>';

echo "<br><br>User List  <span style=\"font-weight: bold;\"> </span>  &nbsp; &nbsp; &nbsp; Created the ";
echo '<span style="font-weight: bold;">';
echo date("$dateFormat");
echo "<span><br>";

echo '
<br>
<br>
<br>
<table border="4" style="text-align: left; width: 914px; height: 58px;"
 cellpadding="2" cellspacing="2">
<tbody>
<tr border="4" style="text-align: left; width: 714px; height: 58px;"
 cellpadding="2" cellspacing="2">
<td border="1" style="width: 20%; background-color: rgb(192, 192, 192);">Name
</td>
<td border="1" style="background-color: rgb(192, 192, 192);">Password</td>
<td style="background-color: rgb(192, 192, 192);">Validity</td>
<td border="1" style="background-color: rgb(192, 192, 192);">Price Billing Plan</td>
<td border="1" style="background-color: rgb(192, 192, 192);">Activate Date</td>
</tr>';


for($i=0;$i<sizeof($accountab);$i++) {
  $username=$accountab[$i];
  $q = "SELECT * FROM userinfo WHERE UserName='$username'"; // get all the timed cards

  $result = $_SESSION["oreon"]->database->database->query($q);
  $row=$oreon->database->database->fetch_object($result);

  $tp=$row->BillingPlan;
  $activeDate=$row->activeDate;
  $tp2=$row->Type;
  $q2 = "SELECT Value FROM radcheck WHERE Attribute ='User-Password' and UserName='$username' "; // get all the timed cards
  
  $result1 = $_SESSION["oreon"]->database->database->query($q2);
  $row1=$oreon->database->database->fetch_array($result1);
  $pass=$row1['Value'];
  $pBp=get_plan_price($tp);
  $nBp=get_plan_device($tp);
  
  $q3 = "SELECT Value FROM $db WHERE $attr and UserName='$username' "; // get all the timed cards
  
  if ($pBp=="") $pBp="none";  
  $result2 = $_SESSION["oreon"]->database->database->query($q3);
  $row2=$oreon->database->database->fetch_array($result2);
  $detail=$row2['Value'];
  
  if ($tp2=="Subscription Expiration" or $tp2=="Expiration")
	  $val=date($dateFormat,strtotime($detail));
  else if ($tp2 == "Hourly" or $tp2 == "Subscription Time")
	    $val = time2str ($detail );
    else if ($tp2 == "Octets" or $tp2 == "Subscription Octets")
      $val = octets2str ($detail);

  
  echo ("<tr>
      <td >$username</td>
      <td >$pass</td>
      <td >$val</td>
      <td >$pBp $nBp</td>
      <td >$activeDate</td>
      </tr>    
      ");
}

echo (" </tbody></table><br><br></body></html>");
?>
Return current item: phpMyPrepaid